Re: Passing arrays into other web pages
| From: | Matt McClanahan | Date: | Tue, 12 Sep 2000 18:32:22 +0000 |
| Subject: | Re: Passing arrays into other web pages | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16416@lists.php.net to get a copy of this message | ||
On Tue, 12 Sep 2000, Adam Plocher wrote:
> How can I pass an array into another page?
Serialize and urlencode it, and reverse the process on the other page.
First page:
<?
$ser = serialize($array);
$ser = urlencode($ser);
echo '<a herf="page.php?ser=' . $ser . '">';
?>
Second page:
<?
$ser = urldecode($ser);
$array = unserialize($ser);
?>
Matt