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