Posted by David Haynes on 04/15/06 02:15
Jack E Leonard wrote:
> I'm looping through the keys and values of a form submission using
>
> foreach($_POST as $key => $value)
> echo "$key = $value<br>";
>
> No problems there. All works as expected. But seveal of the values are
> arrays and the echo comes out like:
>
> subjectone = Array
> subjecttwo = Array
>
> There could be as many as 9 elements in each array but there may be as
> few as one. How can I get those $value that are arrays to echo the
> entire array using a foreach loop? I would like to end up with all
> values printed in the page whether in an array or not.
>
> Thanks
If you don't want to do anything but display them, I would use print_r.
e.g.
echo "<pre>\n";
print_r($_POST);
echo "</pre>\n";
-david-
Navigation:
[Reply to this message]
|