note 102406 deleted from function.domnode-attributes by danbrown
[email protected] Sat, 12 Feb 2011 09:55:50 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: Anonymous
----
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;
}
}?>