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
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-17 01:51 UTC] jmcastagnetto@php.net
This is fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 12:01:30 2024 UTC