Re: Storing an array in the database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

$safe = addslashes(serialize($array));

and store $safe into a text column. Use 

$array = unserialize($database_data);

to get the array back. 

---John Holmes...

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux