note 50770 added to language.types.object

From: Date: Wed, 09 Mar 2005 13:08:18 +0000
Subject: note 50770 added to language.types.object
Groups: php.notes 
Request: Send a blank email to php-notes+get-86154@lists.php.net to get a copy of this message
To sort an array, that contains an object, after one fieldname inside the object, im using this function: function objectSort($objectarray, $field) { for ($a=0;$a < (count($objectarray)); $a++) { for ($b=0;$b < (count($objectarray)); $b++) { if ($objectarray[$a]->$field < $objectarray[$b]->$field) { $temp = $objectarray[$a]; $objectarray[$a] = $objectarray[$b]; $objectarray[$b] = $temp; } } } return $objectarray; } ---- Manual Page -- http://www.php.net/manual/en/language.types.object.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50770 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50770&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50770&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50770&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50770&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50770&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50770&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86154) next »