Re: passing array to another php file
| From: | Michael Virnstein | Date: | Thu, 11 Apr 2002 09:46:47 +0000 |
| Subject: | Re: passing array to another php file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92536@lists.php.net to get a copy of this message | ||
first serialize and then base64encode your array. send this encoded string
to the next page and base64decode it
there first and then unserialize it.
<a
href=\"sample2.php?array=".base64_encode(serialize($array))."\">...</a>
and sample2.php:
<?php
$array = unserialize(base64_decode($array));
print_r($array);
?>
"Hirono Tanaka" <php_hunter@hotmail.com> schrieb im Newsbeitrag
news:F190h331DPrZjuy0RhP00002ff6@hotmail.com...
> Hi, does anyone know how to pass an array to different php file?
>
> Let's assume I have an array $array[] in sample1.php. I want to pass the
> array to a different php files by doing something like:
>
> <a href=\"sample2.php?array=".$array[]."\">...</a>
>
> This didn't work actually. I can't think of any other wayto do this.
> Please help. Thanks.
>
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.comFÀ�²lŠè
> Ãxž P
>