note 10753 added to serialize
| From: | gleb at gleb dot org | Date: | Sat, 20 Jan 2001 09:14:37 +0000 |
| Subject: | note 10753 added to serialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9996@lists.php.net to get a copy of this message | ||
About serializing the arrays via hidden fields:
1st page:
$arr1 = array("HELLO");
<input type="hidden" name="arr1" value="<? echo
urlencode(serialize($arr1)); ?>">
2nd page:
$arr2 = unserialize(urldecode($arr1));
Important: you have to use urldecode function not stripslashes, simply won't work.
http://www.php.net/manual/en/function.serialize.php