Categories
Uncategorized

PHP – Safely serialize and unserialze arrays

Serializing arrays in PHP is a great way to format their content before storing it in a database. However, if the serialized content has certain characters (such as “;” or “:”)  the resulting string won’t be read correctly by the unserialize() function,  which is a huge bummer. So, here’s a workaround.

http://davidwalsh.name/php-serialize-unserialize-issues

Leave a Reply

Your email address will not be published. Required fields are marked *