Re: Using usort() in a class
| From: | Bjoern Hoehrmann | Date: | Wed, 28 Jun 2000 15:40:28 +0000 |
| Subject: | Re: Using usort() in a class | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22642@lists.php.net to get a copy of this message | ||
* Stefan Livieratos <stefan@livieratos.com> wrote:
| ----- Original Message -----
| From: Kristian Koehntopp <kris@koehntopp.de>
Thanks for forwarding, Kristian.
| > cmp() will not be called ($this->cmp reported as an unset variable)
| > and if you use '$this->cmp()' in the call, it will be called once
| > with $a and $b undefined.
| >
| > Can usort() be used in classes?
|
| Try using
|
| usort($arr, array($this,"cmp"));
|
| I haven't tested it though :)
Doesn't either work. $this->cmp() isn't called.
regards,
Björn Höhrmann
--
http://www.bjoernsworld.de/