simple_html_dom::getElementsByTagName PHP Method

getElementsByTagName() public method

public getElementsByTagName ( $name, $idx )
    function getElementsByTagName($name, $idx = -1)
    {
        return $this->find($name, $idx);
    }

Usage Example

Esempio n. 1
0
 /**
  * Search a DOM for a selector and return the contents.
  *
  * @param simple_html_dom $dom The DOM to search.
  * @param string $selector The CSS style selector for the content to find.
  * @param string $default The default content to return if the node isn't found.
  * @return string Returns the content of the found node or {@link $default} otherwise.
  */
 function domGetContent($dom, $selector, $default = '')
 {
     $Element = $dom->getElementsByTagName($selector);
     return isset($Element->content) ? $Element->content : $default;
 }
All Usage Examples Of simple_html_dom::getElementsByTagName