Find all items in this WireArray that match the given selector.

This is non destructive and returns a brand new WireArray.

Example

// Find all items with a title property containing the word "foo"
$matches = $items->find("title%=foo");
if($matches->count()) {
  echo "Found $matches->count items";
} else {
  echo "Sorry, no items were found";
}

Usage

$items = $wireArray->find($selector);

Arguments

NameType(s)Description
$selectorstring or array or Selectors

Return value


WireArray methods and properties

API reference based on ProcessWire core version 3.0.115