> > How would I store an array in the database?  I want to store 2 things.
> > One array of shirt sizes and one array of which holds other arrays.
[snip]
>   $query = "INSERT INTO table
>                  ( field1, field2 )
>                  VALUES
>                  ( \"" . serialize( $singleDimArray ) . "\", \"" .
serialize( $multiDimArray ) . "\" )";

FYI: Make sure you addslashes() _after_ you serialize your array if it can
contain quotes. Everything else remains the same.

---John Holmes...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to