note 47194 added to function.simplexml-element-xpath

From: Date: Fri, 05 Nov 2004 17:52:01 +0000
Subject: note 47194 added to function.simplexml-element-xpath
Groups: php.notes 
Request: Send a blank email to php-notes+get-80159@lists.php.net to get a copy of this message
In the example they show: while(list( , $node) = each($result)) { echo '/a/b/c: ', $node, "\n"; } Running this through the Zend Development Environment with the code analyser produces this a bug. It still runs but if you want to do this a better way with out any issues you can use the follow code example which does the exact samething, but with no code alerts. foreach ( $result as $node ) { echo '/a/b/c: ', $node, "\n"; } ---- Manual Page -- http://www.php.net/manual/en/function.simplexml-element-xpath.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47194 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47194&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47194&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47194&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47194&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47194&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47194&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47194&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80159) next »