note 102406 added to function.domnode-attributes
[email protected] Sat, 12 Feb 2011 06:17:43 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
In response to Ian Monroe's getAttribute function:
DomAttr doesn't have name() and value() methods, those are public properties of the class. Therefore, the correct function will be:
<?php
function getAttribute($name, $att)
{
foreach($att as $i)
{
if($i->name==$name)
return $i->value;
}
}?>
----
Server IP: 69.147.83.197
Probable Submitter: 78.187.44.170
----
Manual Page -- http://www.php.net/manual/en/function.domnode-attributes.php
Edit -- https://master.php.net/note/edit/102406
Del: integrated -- https://master.php.net/note/delete/102406/integrated
Del: useless -- https://master.php.net/note/delete/102406/useless
Del: bad code -- https://master.php.net/note/delete/102406/bad+code
Del: spam -- https://master.php.net/note/delete/102406/spam
Del: non-english -- https://master.php.net/note/delete/102406/non-english
Del: in docs -- https://master.php.net/note/delete/102406/in+docs
Del: other reasons-- https://master.php.net/note/delete/102406
Reject -- https://master.php.net/note/reject/102406
Search -- https://master.php.net/manage/user-notes.php