Re: usort to a Object
| From: | Daniel Convissor | Date: | Wed, 11 Oct 2000 15:15:40 +0000 |
| Subject: | Re: usort to a Object | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19614@lists.php.net to get a copy of this message | ||
Hi Juan:
> var MiArray = Array();
This line produces a parse error on PHP 4.0.2.
> usort($this->MiArray,$this->sort_user);
>... snip ...
> function sort_user($a,$b) {
The function sort_user() requires arguments, but your call to
$this->sort_user doesn't include them. Also, the function name argument in
usort() needs to be a string, not the name of the function itself.
Rework your code and try it out. There may be other problems I didn't catch
off hand.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409