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); ?>

tidy::body

tidy_get_body

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

tidy::body -- tidy_get_bodyReturns a tidyNode object starting from the <body> tag of the tidy parse tree

Descrizione

Stile orientato agli oggetti

public tidy::body(): ?tidyNode

Stile procedurale

tidy_get_body(tidy $tidy): ?tidyNode

Returns a tidyNode object starting from the <body> tag of the tidy parse tree.

Elenco dei parametri

tidy

L'oggetto Tidy

Valori restituiti

Returns a tidyNode object starting from the <body> tag of the tidy parse tree.

Esempi

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>

Vedere anche: