array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'tidy.head.php', 1 => 'tidy::head', ), 'up' => array ( 0 => 'class.tidy.php', 1 => 'tidy', ), 'prev' => array ( 0 => 'tidy.getstatus.php', 1 => 'tidy::getStatus', ), 'next' => array ( 0 => 'tidy.html.php', 1 => 'tidy::html', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'es', 'path' => 'reference/tidy/tidy/head.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8, PECL tidy 0.5.2-1.0.0)
tidy::head -- tidy_get_head — Devuelve un objeto tidyNode empezando con la etiqueta <head>
Estilo orientado a objetos
Estilo por procedimientos
Devuelve un objeto tidyNode empezando por la etiqueta <head>.
Devuelve el objeto tidyNode.
Ejemplo #1 Ejemplo de tidy::head()
<?php
$html = '
<html>
<head>
<title>test</title>
</head>
<body>
<p>parrafo</p>
</body>
</html>';
$tidy = tidy_parse_string($html);
$head = $tidy->head();
echo $head->value;
?>
El resultado del ejemplo sería:
<head> <title>test</title> </head>