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

search for in the

tidyNode::hasChildren> <TidyNode
[edit] Last updated: Fri, 23 Mar 2012

view this page in

tidyNode::getParent

(PHP 5 >= 5.2.2)

tidyNode::getParentGeçerli düğümün ebeveynini döndürür

Açıklama

tidyNode tidyNode::getParent ( void )

Geçerli düğümün ebeveynini döndürür.

Örnekler

Örnek 1 - tidyNode::getParent() örneği

<?php

$html 
= <<< HTML
<html><head>
<?php echo '<title>title</title>'; ?>
<#
  /* JSTE kodu */
  alert('Merhaba Dünya');
#>
 </head>
 <body>
 Merhaba Dünya
 </body>
</html>

HTML;


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

$node $tidy->html()->child[0]->child[0];

var_dump($node->getparent()->name);
?>

Yukarıdaki örneğin çıktısı:

string(4) "head"

Dönen Değerler

Düğümün bir ebeveyni varsa bir tidyNode nesnesi, aksi takdirde NULL döner.



add a note add a note User Contributed Notes tidyNode::getParent
There are no user contributed notes for this page.

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