note 31254 deleted from function.array-multisort by aidan

From: Date: Sun, 03 Oct 2004 10:56:23 +0000
Subject: note 31254 deleted from function.array-multisort by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77798@lists.php.net to get a copy of this message
Note Submitter: steve at mg-rover dot org ---- As someone pointed out above, but I'll reiterate it, if you are using Numeric Keys, this function resets the keys to 0, you need to manually change the key to a none numeric (add a '_' onto the front, for example), call array_sort function and then strip the '_' off the keys again. i.e. Doesn't work: Before:6=5,3=1,5=4,7=1,1=3,2=1,4=1 After:0=5,1=4,2=3,3=1,4=1,5=1,6=1 Works: Before:_6=5,_3=1,_5=4,_7=1,_1=3,_2=1,_4=1 After:_6=5,_5=4,_1=3,_2=1,_3=1,_4=1,_7=1

« previous php.notes (#77798) next »