----- Original Message -----
From: "Jakob Mund" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 07, 2003 9:04 AM
Subject: [PHP-DB] Possible to store arrays in mySQL without
explode()/implode()


> is it possible to store an array in mySQL without using implode() /
> explode(), like this:


Serialize the array to make it a string and store that.  Unserialize() to
make it an array again. The column type you choose depends in the length of
the values you might choose to put in the array.  Serialize the array to a
var and check it's length with strlen to get some ideas of what type you
might need.
http://www.php.net/serialize
http://www.php.net/unserialize



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

Reply via email to