PHP Dokumentation: Tidy head
12. Januar 2010 von werner
tidy::head
tidy_get_head
(PHP 5, PECL tidy 0.5.2-1.0.0)
tidy::head — tidy_get_head — Returns a tidyNode object starting from the <head> tag of the tidy parse tree
Beschreibung
Object oriented style
Procedural style
Returns a tidyNode object starting from the <head> tag of the tidy parse tree.
Parameter-Liste
- object
The Tidy object.
Rückgabewerte
Returns the tidyNode object.
Beispiele
Beispiel #1 tidy::head() example
<?php
$html = '
<html>
<head>
<title>test</title>
</head>
<body>
<p>paragraph</p>
</body>
</html>';$tidy = tidy_parse_string($html);$head = $tidy->head();
echo $head->value;
?>Das oben gezeigte Beispiel erzeugt folgendeAusgabe:
<head><title>test</title></head>
Anmerkungen
Hinweis: Diese Funktion wird nur von der ZendEngine 2 (PHP >= 5.0.0) unterstützt.
Siehe auch
- tidy::body() – Returns a tidyNode object starting from the