public function getContentsByElem($elem) {
        $nodes = $this->_dom_x_path->query("//$elem");
        
        $contents = [];
        
        foreach ($nodes as $node) {
            array_push($contents, $node->nodeValue);
        }
        
        return $contents;
    }
public function getContentsByElem($elem) {
        $nodes = $this->_dom_x_path->query("//$elem");
        
        $contents = [];
        
        foreach ($nodes as $node) {
            array_push($contents, $node->nodeValue);
        }
        
        return $contents;
    }
public function getContentsByElem ( $ elem ) { $ nodes = $ this -> _dom_x_path -> query ( "//$elem" ) ; $ contents = [ ] ; foreach ( $ nodes as $ node ) { array_push ( $ contents , $ node -> nodeValue ) ; } return $ contents ; }
Get contents of an element by using element name

@example    getContentsByElem('div');

@param    string    $elem        Element name

@return array
Get contents of an element by using element name