August 2nd, 2000, 05:33 PM
I have a mutiple select box in form abc. It returns an array as expected. I can break out the vars from the aray. I am not able to put the array in to mysql and get the aray back out. The only thing that ends up in the db is the word array. Ready to bang head on monitor.
Thanks for your help Bill
August 2nd, 2000, 05:42 PM
There is no array datatype so you can't just insert an array into the database. Do you want to have all elements of the array in the same field?
If so, you can implode() the array into one variable and then insert that.
August 2nd, 2000, 05:52 PM
If you don't you can just loop through the array like:
for ($i = 0; $i < count($array); $i++)
mysql_query("INSERT etc. $array[$index]");
August 2nd, 2000, 10:49 PM
Thanks Guys for the fast answers. Rod That did the trick.