note 81644 added to function.dom-domnamednodemap-item

From: Date: Fri, 07 Mar 2008 19:16:35 +0000
Subject: note 81644 added to function.dom-domnamednodemap-item
Groups: php.notes 
Request: Send a blank email to php-notes+get-136826@lists.php.net to get a copy of this message
Please provide an example of how I can loop through all the attributes of an element without knowing their names. Like if I am looking at an element that is <a href='yahoo.com' id='y1' title='go to yahoo'>yahoo.com</a> How can I get the attribute values without specifically calling something like, $element->attributes->getNamedItem('href')->nodeValue $element->attributes->getNamedItem('id')->nodeValue $element->attributes->getNamedItem('title')->nodeValue How do you loop through the attribute and use attributes->item($z) to get the attributes? ---- Server IP: 209.41.74.194 Probable Submitter: 72.250.192.82 ---- Manual Page -- http://www.php.net/manual/en/function.dom-domnamednodemap-item.php Edit -- https://master.php.net/note/edit/81644 Del: integrated -- https://master.php.net/note/delete/81644/integrated Del: useless -- https://master.php.net/note/delete/81644/useless Del: bad code -- https://master.php.net/note/delete/81644/bad+code Del: spam -- https://master.php.net/note/delete/81644/spam Del: non-english -- https://master.php.net/note/delete/81644/non-english Del: in docs -- https://master.php.net/note/delete/81644/in+docs Del: other reasons-- https://master.php.net/note/delete/81644 Reject -- https://master.php.net/note/reject/81644 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136826) next »