php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #9668 typo in foreach manual page
Submitted: 2001-03-10 04:15 UTC Modified: 2001-03-17 01:51 UTC
From: max at flipstorm dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.4pl1 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: max at flipstorm dot net
New email:
PHP Version: OS:

 

 [2001-03-10 04:15 UTC] max at flipstorm dot net
From the foreach manual page:

--------
/* 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] => $k.\n";
}
---------

that print statement should be 
    print "\$a[$i] => $v.\n";

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-17 01:51 UTC] jmcastagnetto@php.net
This is fixed in CVS
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 07:01:27 2025 UTC