ID:               15488
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Windows XP
 PHP Version:      4.1.1
 New Comment:

This bug has been fixed in CVS.


Previous Comments:
------------------------------------------------------------------------

[2002-02-10 10:47:22] [EMAIL PROTECTED]

I was looking through a php manual that I downloaded yesterday
(php_manual_en.pdf.zip) and noticed what looks like an error on page
149 (PDF page 216).  Right at the bottom of the page, there is a
foreach() usage example.  Example 2 is as follows:

/* foreach example 2: value (with key printed for illustration) */
$a = array (1, 2, 3, 17);
$i = 0; /* for illustrative purposes only */
foreach($a as $v) {
print "\$a[$i] => $v.\n";
}

But $i will always be 0, as it is never modified in the loop!  I found
the same error in the online manual at
http://www.php.net/manual/en/control-structures.foreach.php

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15488&edit=1

Reply via email to