|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-28 14:37 UTC] rasmus@php.net
[2002-06-28 15:05 UTC] bstoppel at ku dot edu
[2002-06-28 15:15 UTC] mfischer@php.net
[2002-08-20 16:52 UTC] long at ku dot edu
[2002-08-20 19:34 UTC] nohn@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 13:00:02 2026 UTC |
I used the example given in the asort documentation. The result is not correct. Here is the example for your convenience: $fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); asort ($fruits); reset ($fruits); while (list ($key, $val) = each ($fruits)) { echo "$key = $val\n"; } The actual output is d = lemon a = orange b = banana c = apple The expected output is c = apple b = banana d = lemon a = orange