Re: Storing an array in the database
| From: | 1LT John W. Holmes | Date: | Fri, 28 Feb 2003 16:37:04 +0000 |
| Subject: | Re: Storing an array in the database | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26005@lists.php.net to get a copy of this message | ||
> 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...