Bug #14551 Updated: mistake on "array_keys"
| From: | derick@php.net | Date: | Sun, 16 Dec 2001 21:21:23 +0000 |
| Subject: | Bug #14551 Updated: mistake on "array_keys" | ||
| References: | 1 | Groups: | php.dev php.doc |
| Request: | Send a blank email to php-dev+get-74052@lists.php.net to get a copy of this message | ||
ID: 14551
Updated by: derick
Reported By: luodonghua@hotmail.com
Old Status: Open
Status: Closed
Bug Type: Documentation problem
Operating System:
PHP Version: 4.1.0
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2001-12-16 15:50:33] luodonghua@hotmail.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.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14551&edit=1