note 30948 added to function.array-multisort

From: Date: Fri, 04 Apr 2003 04:51:44 +0000
Subject: note 30948 added to function.array-multisort
Groups: php.notes 
Request: Send a blank email to php-notes+get-46204@lists.php.net to get a copy of this message
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... -- http://www.php.net/manual/en/function.array-multisort.php http://master.php.net/manage/user-notes.php?action=edit+30948 http://master.php.net/manage/user-notes.php?action=delete+30948 http://master.php.net/manage/user-notes.php?action=reject+30948

« previous php.notes (#46204) next »