Josh Howe wrote:
> function that is crashing apache.
Seems soo unlikely. What do you mean exactly by this? PHP doing infinte loop?
private function sort() {
Why not simply use the std sort function? Dont reinvent the wheel http://www.php.net/manual/en/function.sort.php
> if ($val2 > $val1) > return true; > else > return false;
With bools, simply use
return $val2 > $val1;
if ($this->order_dir == "desc") {
if ($val2 > $val1)
return true;
else return false;
} else {
if ($val1 > $val2)
return true;
else return false;
}
Can be simply written like this (I think it's more readable)
return ($this->order_dir == "desc") ? $val2 > $val1 : $val1 > $val2
Christophe
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php