array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'tidy.body.php', 1 => 'tidy::body', 2 => 'Returns a tidyNode object starting from the <body> tag of the tidy parse tree', ), 'up' => array ( 0 => 'class.tidy.php', 1 => 'tidy', ), 'prev' => array ( 0 => 'class.tidy.php', 1 => 'tidy', ), 'next' => array ( 0 => 'tidy.cleanrepair.php', 1 => 'tidy::cleanRepair', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/tidy/tidy/body.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5, PHP 7, PHP 8, PECL tidy 0.5.2-1.0)
tidy::body -- tidy_get_body — Returns a tidyNode object starting from the <body> tag of the tidy parse tree
Stile orientato agli oggetti
Stile procedurale
Returns a tidyNode object starting from the <body> tag of the tidy parse tree.
Returns a tidyNode object starting from the <body> tag of the tidy parse tree.
Example #1 tidy::getBody() example
<?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;
?>
Il precedente esempio visualizzerĂ :
<body> <p>paragraph</p> </body>