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

search for in the

DOMNode> <DOMNamedNodeMap::getNamedItemNS
[edit] Last updated: Fri, 17 May 2013

view this page in

DOMNamedNodeMap::item

(PHP 5)

DOMNamedNodeMap::itemRetourne un noeud selon son index

Description

DOMNode DOMNamedNodeMap::item ( int $index )

Retourne un noeud spécifié par index dans l'objet DOMNamedNodeMap.

Liste de paramètres

index

Index dans cette carte.

Valeurs de retour

Le noeud à la position index dans la carte, ou NULL si ce n'est pas un index valide (plus grand que ou égal au nombre de noeuds dans cette carte).



add a note add a note User Contributed Notes DOMNamedNodeMap::item - [1 notes]
up
-1
reyjacobs at yahoo dot com
5 years ago
Nevermind: I got it, and here it is:

<?php
if($element->hasAttributes())
{
   
$attributes = $element->attributes;
    if(!
is_null($attributes))
    {
        foreach (
$attributes as $index=>$attr)
        {
            echo
$attr->name."=\"".$attr->value."\"";
        }
    }
}
?>

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