note 30948 deleted from function.array-multisort by didou
| From: | didou@php.net | Date: | Fri, 03 Oct 2003 10:09:23 +0000 |
| Subject: | note 30948 deleted from function.array-multisort by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57672@lists.php.net to get a copy of this message | ||
Note Submitter: hav0x@DAMNSPAM.havocware.com
----
array-multisort doesn't seem to like it's parameters as anything but pure text strings:
This example will not sort on the SORT_ASC/SORT_DESC criteria:
-----
$order = array('SORT_ASC','SORT_DESC');
array_multisort($sort_array,SORT_STRING,$order[$o_id],$data_array);
// perhaps $o_id is an incoming variable passed via url with a value of 0 or 1.
-----
The parameter is dismissed, and sorting takes its default decension.
The same seems to be true for the criteria parameters (STRING, NUMERIC, etc.)
It would be nice to be able pass the params as integer values...