$ser_array = serialize($myarray); then store $ser_array to a table as BLOB, TEXT, or even VARCHAR
to use its contents, read it from the table and use unserialize() -----Original Message----- From: Jan Grafström [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 10:35 AM To: [EMAIL PROTECTED] Subject: [PHP] Store array into mysql? Hi! I have an array called $myarray and now I want to store it in a mysql table. I tried to just, insert into mytable values('$id', '$myarray') but just got Array when I run while ($row = mysql_fetch_array ($result)) $myarray= $row[myarray]; echo $myarray -- Do I need to first make a string commaseparated or like and than insert that string? Thanks in advance. Regards, Jan Grafström -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php