note 40164 added to function.array-multisort

From: Date: Mon, 23 Feb 2004 22:42:49 +0000
Subject: note 40164 added to function.array-multisort
Groups: php.notes 
Request: Send a blank email to php-notes+get-65618@lists.php.net to get a copy of this message
Came accross this by accident... when passing SORT_ASC or SORT_DESC to array_multisort, you need to be aware of type. SORT_ASC, for instance is (currently) 3. passing '3' to array_multisort results in a warning. So, if you're not sure, cast the value to an int (or use intval). (this was noticed after passing SORT_DESC in a form, and having php convert it to '3'). S ---- Manual Page -- http://www.php.net/manual/en/function.array-multisort.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40164 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40164&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40164&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65618) next »