note 59873 added to function.simplexml-element-xpath
| From: | Hugh at osu1 dot php dot net | Date: | Sun, 18 Dec 2005 23:23:19 +0000 |
| Subject: | note 59873 added to function.simplexml-element-xpath | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100389@lists.php.net to get a copy of this message | ||
Note that this function does not ALWAYS return an array. It seems that if the specified path is not
found in the document, it will return false. You need to check for the false value before using
foreach, if you wish to avoid a warning (and often to handle errors or control program flow in this
situation).
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-element-xpath.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59873
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59873&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59873&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59873&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59873&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59873&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59873&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59873&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59873&report=yes
Search -- http://master.php.net/manage/user-notes.php