tidy::body

tidy_get_body

(PHP 5, PHP 7, PECL tidy 0.5.2-1.0)

tidy::body -- tidy_get_body Retourne un objet TidyNode, commencé à partir de la balise <body>

Description

Style orienté objet

public tidy::body ( void ) : tidyNode

Style procédural

tidy_get_body ( tidy $object ) : tidyNode

Retourne un objet TidyNode commençant à partir de la balise <body>.

Liste de paramètres

object

L'objet Tidy

Valeurs de retour

Retourne un objet tidyNode en commençant par la balise <body> de l'arbre analysé tidy.

Exemples

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>

Voir aussi

  • tidy::head() - Retourne un objet tidyNode à partir de la balise <head>
  • tidy::html() - Retourne un objet tidyNode commençant à la balise <html>