Re: How do I print Multi Dimensional Arrays?
| From: | Monte Ohrt | Date: | Tue, 09 Jan 2001 20:09:12 +0000 |
| Subject: | Re: How do I print Multi Dimensional Arrays? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33532@lists.php.net to get a copy of this message | ||
Hi Brandon,
echo $array[0][1];
That will print one element of that array.
If you want a quick and dirty way to "see" the entire array structure
without having to write a bunch of nested loops, use var_dump().
var_dump($array);
works great for debugging.
Monte
Brandon Orther wrote:
>
> I am having troubles trying to print multi dimensional arrays. Here is what
> I though I would have to do:
>
> echo "array[0][1]";
>
> if you can help thanks in advance.
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon@webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net