note 81362 added to function.array-multisort

From: Date: Sun, 24 Feb 2008 19:02:06 +0000
Subject: note 81362 added to function.array-multisort
Groups: php.notes 
Request: Send a blank email to php-notes+get-136460@lists.php.net to get a copy of this message
I believe this should read: foreach($firstarray as $sortarray){ $column[] = $sortarray['email']; } //sort arrays after loop array_multisort($column, SORT_ASC, $firstarray); Otherwise you will get an array is inconsistent err because $column array won't equal $firstarray until the loop completes. It was the only way I got it to work, then it was fine. If I am wrong please post a correction. ---- Server IP: 69.147.83.197 Probable Submitter: 205.201.148.20 ---- Manual Page -- http://www.php.net/manual/en/function.array-multisort.php Edit -- https://master.php.net/note/edit/81362 Del: integrated -- https://master.php.net/note/delete/81362/integrated Del: useless -- https://master.php.net/note/delete/81362/useless Del: bad code -- https://master.php.net/note/delete/81362/bad+code Del: spam -- https://master.php.net/note/delete/81362/spam Del: non-english -- https://master.php.net/note/delete/81362/non-english Del: in docs -- https://master.php.net/note/delete/81362/in+docs Del: other reasons-- https://master.php.net/note/delete/81362 Reject -- https://master.php.net/note/reject/81362 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136460) next »