Doc #53468 [Opn->Wfx]: example 1 for ksort(): match fruit names to index letters
| From: | danbrown@php.net | Date: | Fri, 03 Dec 2010 20:54:42 +0000 |
| Subject: | Doc #53468 [Opn->Wfx]: example 1 for ksort(): match fruit names to index letters | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5617@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53468&edit=1
ID: 53468
Updated by: danbrown@php.net
Reported by: ian at gumstix dot com
Summary: example 1 for ksort(): match fruit names to index
letters
-Status: Open
+Status: Wont fix
Type: Documentation Problem
Package: Documentation problem
Operating System: not applicable
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
There's not enough need for that, and - if anything - could potentially
introduce
more of an issue by using a lower-case 'L' in the example. It's worked
fine for
years.
Previous Comments:
------------------------------------------------------------------------
[2010-12-03 21:49:44] ian at gumstix dot com
Description:
------------
---
From manual page: http://www.php.net/function.ksort#Examples
---
The example would be clearer if the first letter of each array value
matched the corresponding array key, like so:
$fruits = array("l"=>"lemon", "c"=>"cranberry",
"a"=>"apple",
"b"=>"banana");
Then, when the output is shown, the reader can easily see that key =>
value mappings are preserved:
a = apple
b = banana
c = cranberry
l = lemon
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53468&edit=1