|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-25 10:05 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ It seems to me that array_multisort() is not working properly (does not sort at all) for a reference to an array. The example code is listed below. I noticed that sort() works properly. <?PHP $p['us'] = array(); $arr = &$p['us']; $arr[]=4; $arr[]=2; $arr[]=1; $arr[]=5; array_multisort($arr); //sort($arr); this works properly. for ($i=0; $i<count($arr); $i++) { echo($arr[$i]); echo("\n"); } ?>