Check out the serialize() and unserialize() functions: http://us3.php.net/manual/en/function.serialize.php http://us3.php.net/manual/en/function.unserialize.php You need to serialize() the data, *then* addslashes(), then insert into the database. When you pull it out, stripslashes() then unserialize().