note 31628 added to function.asort
| From: | spectre at hellfish dot NOSPAM dot org | Date: | Mon, 28 Apr 2003 14:54:49 +0000 |
| Subject: | note 31628 added to function.asort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47212@lists.php.net to get a copy of this message | ||
that works nicely, tho it breaks the result-array up if one or more of arrays indexes are deleted
before sorting. this one should fix it up:
change:
for ($i = 0; $i < sizeof($array); $i++) {
to:
foreach ($array as $i => $k) {
--
http://www.php.net/manual/en/function.asort.php
http://master.php.net/manage/user-notes.php?action=edit+31628
http://master.php.net/manage/user-notes.php?action=delete+31628
http://master.php.net/manage/user-notes.php?action=reject+31628