RE: [PHP] Help with Array Walk
| From: | Ford, Mike [LSS] | Date: | Thu, 28 Feb 2002 12:16:15 +0000 |
| Subject: | RE: [PHP] Help with Array Walk | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-86584@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Vidyut Luther [mailto:vluther@linuxpowered.com]
> Sent: 28 February 2002 01:27
>
> but when i do.
>
>
> array_walk ($fieldname, '$check->is_allletters');
>
> I get the error.
> Warning: Unable to call $check->is_allletters() - function does not
> exist .
RTFM: http://www.php.net/manual/en/function.array-walk.php,
right near the beginning, contains the following:
> Note: Instead of a function name, an array containing an object
> reference and a method name can also be supplied.
So you want:
array_walk ($fieldname, array($check,'is_allletters');
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211