note 10753 deleted from function.serialize by felipe
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
Note Submitter: gleb at gleb dot org
----
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.