Hi.
I've been trying for some time to place variable arrays into a MySQL database, in a single cell. The data inserted will be integers only. So far, I've only puzzled ut the actual syntax for inserting, and it runs something along the lines of this (Don't worry about the INSERT code, just the latter VALUES bit.
mysql_query('INSERT INTO tablename VALUES (' . implode(',', array_map('quote_smart', $result[0])) . ')');
If anyone can reccomend a better way of doing this, please let me know. Also, I would appreciate it if anyone could also post a good reverse of this, as in take the imploded array and break it up into the component parts it was in before. You'll probably need to use the explode function. Thanks.