find (
    string $selector
    [, int $idx = null ]
    [, bool $lowercase = false ]
) : mixed
Parameter Description
selector CSS selector.
idx Index of element to return.
lowercase Matches tag names case insensitive (lowercase) if enabled.

Finds one or more nodes in the current document, using CSS selectors.

  • Returns null if no match was found.
  • Returns an array of HtmlNode if $idx is null.
  • Returns an object of type HtmlNode if $idx is anything but null.

Supported Selectors