note 81658 added to function.simplexml-element-getName
| From: | Anonymous at osu1 dot php dot net | Date: | Sat, 08 Mar 2008 19:11:55 +0000 |
| Subject: | note 81658 added to function.simplexml-element-getName | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136845@lists.php.net to get a copy of this message | ||
In Response to:
Some unexpected behaviour noticed:
<?php
echo $root->parent->child->getName();
?>
"child" is expected, although "parent" is returned
My Suggestion is to use
<?php
echo $root->parent[0]->child[0]->getName();
?>
Instead. I dunno why, but this works.
----
Server IP: 212.124.37.9
Probable Submitter: 87.153.236.185
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-element-getName.php
Edit -- https://master.php.net/note/edit/81658
Del: integrated -- https://master.php.net/note/delete/81658/integrated
Del: useless -- https://master.php.net/note/delete/81658/useless
Del: bad code -- https://master.php.net/note/delete/81658/bad+code
Del: spam -- https://master.php.net/note/delete/81658/spam
Del: non-english -- https://master.php.net/note/delete/81658/non-english
Del: in docs -- https://master.php.net/note/delete/81658/in+docs
Del: other reasons-- https://master.php.net/note/delete/81658
Reject -- https://master.php.net/note/reject/81658
Search -- https://master.php.net/manage/user-notes.php