Say I have this array, $week, with lots of data. Like $week[0] contains this:
$week[0][day] = "Monday";
$week[0][string] = "Monday, June 4th 2001";
$week[0][date] = "2001-06-04";
I know this information here, but what if I don't know how the array is structured? I want to find a way to print out that information. Right now I print posted variables like this:
while (list($var, $value) = each($HTTP_POST_VARS)) {
print "<input type=hidden name=\"$var\" value=\"$value\">\n";
But I want to throw in there an array checker. So maybe like this:
while (list($var, $value) = each($HTTP_POST_VARS)) {
if (is_array($var))
// do something
else // just print it out
print "<input type=hidden name=\"$var\" value=\"$value\">\n";
Any ideas how I can do this? Print out all the variables in the array and their structure, so I can continue posting?
Thanks!
Mike