usort inside a class
| From: | It Maq | Date: | Fri, 09 May 2008 20:38:45 +0000 |
| Subject: | usort inside a class | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-274104@lists.php.net to get a copy of this message | ||
Hi,
i'm trying to build a class that sorts a multidimensional array.
I'm using the php function "usort".
I declared the comparision function as a method of my class but i'm unable to give it as
argument to the function usort.
this "usort($this->arr, $this->cmpi)" gaves the following error: usort()
[function.usort]: Invalid comparison function
i tried to do "usort($this->arr, 'cmpi')" but it does not work either.
Thanks
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ