| Posted by Robin on 04/15/06 01:55 
Try another foreach, e.g.
 foreach($_POST as $key => $value)
 {
 if(is_array($value))
 {
 foreach($value as ...)
 {...}
 }
 else
 {...}
 }
 
 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
  Navigation: [Reply to this message] |