(PHP 5, PHP 7, PHP 8, PECL tidy 0.5.2-1.0)
tidy::body -- tidy_get_body — Retourne un objet TidyNode, commencé à partir de la balise <body>
Style orienté objet
Style procédural
Retourne un objet TidyNode commençant à partir de la balise <body>.
Retourne un objet tidyNode en commençant par la balise <body> de l'arbre analysé tidy.
Exemple #1 Exemple avec tidy::getBody()
<?php
$html = '
<html>
 <head>
  <title>test</title>
 </head>
 <body>
  <p>paragraph</p>
 </body>
</html>';
$tidy = tidy_parse_string($html);
$body = tidy_get_body($tidy);
echo $body->value;
?>
L'exemple ci-dessus va afficher :
<body> <p>paragraph</p> </body>