CakeFest 2024: The Official CakePHP Conference

tidy::html

tidy_get_html

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

tidy::html -- tidy_get_html Retourne un objet tidyNode commençant à la balise <html>

Description

Style orienté objet

public tidy::html(): ?tidyNode

Style procédural

tidy_get_html(tidy $tidy): ?tidyNode

Retourne un objet tidyNode commençant à la balise <html>.

Liste de paramètres

tidy

L'objet Tidy

Valeurs de retour

Retourne l'objet tidyNode.

Exemples

Exemple #1 Exemple avec tidy::html()

<?php
$html
= '
<html>
<head>
<title>test</title>
</head>
<body>
<p>paragraph</p>
</body>
</html>'
;

$tidy = tidy_parse_string($html);

$html = $tidy->html();
echo
$html->value;
?>

L'exemple ci-dessus va afficher :

<html>
 <head>
  <title>test</title>
 </head>
 <body>
  <p>paragraph</p>
 </body>
</html>

Voir aussi

  • tidy::body() - Retourne un objet TidyNode, commencé à partir de la balise <body>
  • tidy::head() - Retourne un objet tidyNode à partir de la balise <head>
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top