downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

tidyNode::isAsp> <tidyNode::hasChildren
[edit] Last updated: Fri, 17 May 2013

view this page in

tidyNode::hasSiblings

(PHP 5 >= 5.0.1)

tidyNode::hasSiblingsIndica si un nodo tiene hermanos

Descripción

bool tidyNode::hasSiblings ( void )

Indica si un nodo tiene hermanos.

Valores devueltos

Devuelve TRUE si un nodo tiene hermanos, FALSE de lo contrario.

Ejemplos

Ejemplo #1 Ejemplo de tidyNode::hasSiblings()

<?php

$html 
= <<< HTML
<html><head>
<?php echo '<title>titulo</title>'; ?>
<# 
  /* código JSTE */
  alert('Hola Mundo'); 
#>
</head>
<body>

<?php
  // código PHP 
  echo 'Hola Mundo!';
?>

<%
  /* código ASP */
  response.write("Hola Mundo!")
%>

<!-- Comentarios -->
Hola Mundo
</body></html>
Fuera del HTML
HTML;


$tidy tidy_parse_string($html);
$num 0;

// La etiqueta HTML
var_dump($tidy->html()->hasSiblings());

// La etiqueta HEAD
var_dump($tidy->html()->child[0]->hasSiblings());

?>

El resultado del ejemplo sería:

bool(false)
bool(true)

Notas

Nota:

Esta función fue nombrada tidy_node::has_siblings() en PHP 4/Tidy 1.



add a note add a note User Contributed Notes tidyNode::hasSiblings - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites