note 59873 modified in function.simplexml-element-xpath by danbrown

From: Date: Wed, 16 Sep 2009 15:54:13 +0000
Subject: note 59873 modified in function.simplexml-element-xpath by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-160694@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). --was-- 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). http://php.net/manual/en/function.simplexml-element-xpath.php

« previous php.notes (#160694) next »