public function html($html_string=null)
    {
        if ($html_string !== null) { // set html for all nodes
            foreach ($this as $node) {
                $node->get(0)->nodeValue = '';
                $node->append($html_string);
            }

            return $this;
        }
        // get html for first node
        return $this->getInnerHtml();
    }
public function html($html_string=null)
    {
        if ($html_string !== null) { // set html for all nodes
            foreach ($this as $node) {
                $node->get(0)->nodeValue = '';
                $node->append($html_string);
            }

            return $this;
        }
        // get html for first node
        return $this->getInnerHtml();
    }
public function html ( $ html_string = null ) { if ( $ html_string !== null ) { // set html for all nodes foreach ( $ this as $ node ) { $ node -> get ( 0 ) -> nodeValue = '' ; $ node -> append ( $ html_string ) ; } return $ this ; } // get html for first node return $ this -> getInnerHtml ( ) ; }
Get the HTML contents of the first element in the set of matched elements

@param string|null $html_string

@return $this|string
Get the HTML contents of the first element in the set of matched elements