php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #14551 mistake on "array_keys"
Submitted: 2001-12-16 15:50 UTC Modified: 2001-12-16 16:21 UTC
From: luodonghua at hotmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.1.0 OS:
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: luodonghua at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-12-16 15:50 UTC] luodonghua at hotmail dot com
There is a mistake on the "Download documentation".(The download version, like http://sg.php.net/distributions/manual/manual-en.chm
)
In the download documentation,there is a mistake in the "array_keys".

The origin on the documentation is:

Example 2. Implementation of array_keys() for PHP 3 users 
function array_keys ($arr, $term="") {
    $t = array();
    while (list($k,$v) = each($arr)) {
        if ($term && $v != $term) {
            continue;
            $t[] = $k;
        }
        return $t;
    }
}

I think it should be 
function array_keys ($arr, $term="") {
    $t = array();
    while (list($k,$v) = each($arr)) {
        if ($term && $v != $term) {
            continue;
        }
        $t[] = $k;
    }
    return $t;
}

Online documentation do not have such problem.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-16 16:21 UTC] derick@php.net
Thank you for this report, as soon as I'm able to build new CHM manuals, those will be fixed (they are generated from the online docs).

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 19:01:27 2024 UTC