Re: array into another site
| From: | Justin French | Date: | Tue, 25 Mar 2003 10:21:09 +0000 |
| Subject: | Re: array into another site | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140928@lists.php.net to get a copy of this message | ||
1. Missing an equal sign: <?=$ not <?$
window.open('view.php?arr=<?=$arr;?>','windo...
2. Check out serialize()
http://www.php.net/manual/en/function.serialize.php
window.open('view.php?arr=<?=serialize($arr)?>','windo...
3. However, this creates a URL which isn't particularly URL friendly (not
sure, but perhaps maybe not even valid -- I don't know), so....
4. based on your array's size, I'd just implode() it, and then explode() it
back out on the new site:
window.open('view.php?arr=<?=implode('-',$arr)?>','windo...
Justin French
on 25/03/03 8:50 PM, Fredrik (sd@nextgentel.no) wrote:
> Hi
>
> I have an PHP array and want to send it into another PHP site.
>
> $arr =
> array(251,1,23,54,15,135,1651,156,13,123,321,123,32,54,654,456,32,1);
>
> ?>
> <script language="JavaScript" type="text/javascript">
> <a href=\"javascript: void(vindu2 =
> window.open('view.php?arr=<?$arr;?>','windowname','toolbar=no,
> location=no,
> directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes,
> width=850, height=700')); vindu2.focus();\">View</a>
> </script>
>
>
> Anybody knows how to do this?
>
> Fred
>
>