note 1469 deleted from function.unserialize by sniper

From: Date: Mon, 13 Oct 2003 03:20:33 +0000
Subject: note 1469 deleted from function.unserialize by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58497@lists.php.net to get a copy of this message
Note Submitter: jb@as220.org ---- Had a little trouble (few hours worth) that turned out to be with unserialize(). So here is a way to apparently reliably reconstitute a serialized somewhat complex array (used for cookies in my case). Can be called multiple times without harm: <pre> function cookie2array(&$argRef) { if (is_string($argRef)) $argRef= unserialize(stripslashes($argRef)); } </pre> string and numeric indices back into

« previous php.notes (#58497) next »