I created an Array in PHP. I then want to send it to another webpage and be able to retreive the array and display it. Here is the code:
Page1:
<?php
$db_table[] = array("car","make","model");
echo"<form action='post_array_info.php' method='post'>";
echo"<input type='hidden' name='db_table[]' value='$db_table'>";
echo"<input type='submit' value='submit_it' name='Submit data'>";
print_r ($db_table);
?>
Page 2:
<?php
$db_table=$_POST['db_table'];
echo "0=$db_table[0]<br>";
print_r ($db_table);
?>
My output looks like this:
0=Array
Array ( [0] => Array )
My am I not seeing car for [0] and the print_r showing me car,make,model? I've tried a couple of different ways but it still only shows the word Array.
Thanks,
Brent