Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 418 Bytes

text.md

File metadata and controls

14 lines (10 loc) · 418 Bytes

text()

Retrieves the combined value of all the text nodes in the collection. The formatting of the text will not be altered from how it is in the HTML, although spaces will be added between text from different elements.

$doc = new \hexydec\html\htmldoc();
if ($doc->load($html)) {
	echo $doc->text();
}

Returns

A string containing the combined contents of the text nodes in an HTMLdoc collection.