Re: Why is this array_walk_recursive action not working?
| From: | FeIn | Date: | Thu, 24 Feb 2011 11:40:54 +0000 |
| Subject: | Re: Why is this array_walk_recursive action not working? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311558@lists.php.net to get a copy of this message | ||
Hi,
How does the input array look like (the contents of the $karamohArray
variable) ? Is your script generating any errors? What do you expect to
happen when you call array_walk_recursive?
On Thu, Feb 24, 2011 at 1:01 PM, Dave M G <martin@autotelic.com> wrote:
> PHP users,
>
> I obviously don't understand what array_walk_recursive does.
>
> Can someone break down in simple terms why the following doesn't work?
>
> - - -
>
> $karamohOutput['test'] = "";
>
> function test_print($item, $key)
> {
> return "$key holds $item\n";
> }
> $karamohOutput['test'] .= array_walk_recursive($karamohArray,
> 'test_print');
>
> - - -
>
> Any advice would be much appreciated.
>
> --
> Dave M G
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>