note 129019 added to xmlreader.getattribute
| From: | sven at e7o dot de | Date: | Wed, 08 Nov 2023 14:44:06 +0000 |
| Subject: | note 129019 added to xmlreader.getattribute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220975@lists.php.net to get a copy of this message | ||
To get all attributes and their names, use something like this:
<?php
function getAttributes($reader)
{
$attributes = [];
for ($i = 0; $i < $reader->attributeCount; $i++) {
$reader->moveToAttributeNo($i);
$attributes[$reader->name] = $reader->value;
}
return $attributes;
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 31.19.238.161)
----
Manual Page -- https://php.net/manual/en/xmlreader.getattribute.php
Edit -- https://main.php.net/note/edit/129019
Del: integrated -- https://main.php.net/note/delete/129019/integrated
Del: useless -- https://main.php.net/note/delete/129019/useless
Del: bad code -- https://main.php.net/note/delete/129019/bad+code
Del: spam -- https://main.php.net/note/delete/129019/spam
Del: non-english -- https://main.php.net/note/delete/129019/non-english
Del: in docs -- https://main.php.net/note/delete/129019/in+docs
Del: other reasons-- https://main.php.net/note/delete/129019
Reject -- https://main.php.net/note/reject/129019
Search -- https://main.php.net/manage/user-notes.php