Return to Snippet

Revision: 31244
at September 1, 2010 21:36 by FreaKzero

Initial Code
function save_serialize($ARR) {
 return base64_encode(serialize($ARR));      

function save_unserialize($STR) {
 return unserialize(base64_decode($STR));      

Initial URL

Initial Description
In a Project i had to save serialized arrays in a MYSQL Database, when i used that i got a Error Message for no reason  (Error at offset XX of XX bytes in...). I wrote this little functions to fix that issue. (I dont recommend to save serialized Arrays in Databases )

Initial Title
serialize and unserialize functions for MYSQL Storage

Initial Tags
mysql, php, error

Initial Language