note 23677 added to function.array-multisort
| From: | php-general at lists dot php dot net | Date: | Wed, 24 Jul 2002 19:23:52 +0000 |
| Subject: | note 23677 added to function.array-multisort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33520@lists.php.net to get a copy of this message | ||
the 13-Apr note by richard is really handy when you don't have database acces/support and
you're using multiple arrays instead. It can be used for example to sort topics in a forum on
'last edited'. Make sure you have 2 arrays, one with the different topics (for example
filenames) and one with the 'last-edited times'
array_multisort($topicfilenames,SORT_DESC,$lasteditedtimes);
--
http://www.php.net/manual/en/function.array-multisort.php
http://master.php.net/manage/user-notes.php?action=edit+23677
http://master.php.net/manage/user-notes.php?action=delete+23677
http://master.php.net/manage/user-notes.php?action=reject+23677