Sorting Multidimensional Array
| From: | Keith Spiller | Date: | Tue, 31 Oct 2006 17:10:13 +0000 |
| Subject: | Sorting Multidimensional Array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-243959@lists.php.net to get a copy of this message | ||
Hi,
RE: Sorting Multidimensional Array
I'm trying to sort a multidimensional array. The data was taken from
a mysql query:
$myrow = mysql_fetch_row($result) {
query[] = $myrow;
}
The purpose is to retrieve the table data and manually add a record,
then sort ASC by the startdate which is the forth field...
Something like:
$test = array_multisort($query, $key = '$query[4]');
Any help would be greatly appreciated. Thanks,
Keith