ok, add the following lines to your ingress.lib-file: /***********************/ // converts any array to an instance of the ingress-class function array2IngressClass($array) { $inst = new ingress(); while(list($key, $val) = each($array)) $inst->$key = $val; return $inst; } // converts any class into an array function class2Arr($class) { return (array)$class; } // sorts arrays comeing from hentIngresser() descending function sortClassArray($array) { $arr = array(); $sArr = array(); foreach($array as $ent) { $arr[] = class2Arr($ent); $sArr[] = $ent->publisertLang; } array_multisort($arr, SORT_DESC, $sArr); $cM = count($arr); for($c = 0; $c < $cM; $c++) $arr[$c] = array2IngressClass($arr[$c]); return $arr; }
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php