Scriptindex.de

[ Menü ]

Home
News
Scripts
Neuzugänge
Suchen
Bücher
Manuals

[ Inhalt ]

Script eintragen
Tutorial eintragen
Newsletter
Umfragen
Link zu uns
Werbung bei uns
Kontakt
Impressum

[ Statistik ]

Hits gesamt: 5203280
Hits Heute: 1383
max. Hits (10.07.07): 6964
User Online: 29
Scripts: 2828

[ Partner ]

CodeBase
I.S.U.M.
LUG Bayreuth
PEAR NEWS
PHP Classes

[ Facebook ]

[ Eigene Domain? ]

[ Buchtipp ]

Jetzt lerne ich JavaScript und HTML . Der einfache Einstieg ins Web-Scripting
Jetzt lerne ich JavaScript und HTML . Der einfache Einstieg ins Web-Scripting

Manuals > PHP > DomElement->get_elements_by_tagname

DomElement->get_elements_by_tagname

(no version information, might be only in CVS)

DomElement->get_elements_by_tagname --  Gets elements by tagname

Description

bool DomElement->get_elements_by_tagname ( string name)

This function returns an array with all the elements which has name as his tagname. Every element of the array is an DomElement.

Beispiel 1. Getting a content

<?php
if(!$dom = domxml_open_mem($xmlstr)) {
  echo
"Error while parsing the document\n";
  exit;
}

$root = $dom->document_element();

$node_array = $root->get_elements_by_tagname("element");

for (
$i = 0; $i<count($node_array); $i++)
{
    
$node = $node_array[$i];
    print (
"The element[$i] is: ".$node->get_content());
}

?>


Copyright 1998 - 2009 by I.S.U.M.