note 96234 deleted from function.unserialize by danbrown
| From: | danbrown@php.net | Date: | Tue, 16 Feb 2010 15:47:11 +0000 |
| Subject: | note 96234 deleted from function.unserialize by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-166010@lists.php.net to get a copy of this message | ||
Note Submitter: jeanbaptiste dot verrey at gmail dot com
----
@skinnepa at hotmail dot com
he's implementation is the ONLY ONE that worked for me, I had my MySQL in utf-8 (table and
connection) but when I was saving russian serialized characters into a text field nothing was
working! thank you^^
function mb_unserialize($serial_str) {
$out = preg_replace('!s:(\d+):"(.*?)";!se',
"'s:'.strlen('$2').':\"$2\";'", $serial_str );
return unserialize($out);
}