tidy::html
PHP function
Edit on GitHub ✎
Returns a tidyNode object starting from the <html> tag of the tidy parse tree
Description
Oop
tidy::html(): tidyNode|null
Procedural
tidy_get_html(tidy $tidy): tidyNode|null
Returns a tidyNode object starting from the <html> tag of the tidy parse tree.
Parameters
tidyObject
Return Values
Returns the tidyNode object.
Examples
tidy::html() example
php
<?php
$html = '
<html>
<head>
<title>test</title>
</head>
<body>
<p>paragraph</p>
</body>
</html>';
$tidy = tidy_parse_string($html);
$html = $tidy->html();
echo $html->value;
?>The above example will output:
output
<html>
<head>
<title>test</title>
</head>
<body>
<p>paragraph</p>
</body>
</html>