Re: sending array

From: Date: Wed, 15 Jan 2003 13:06:32 +0000
Subject: Re: sending array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-131692@lists.php.net to get a copy of this message
On Wednesday 15 January 2003 20:59, Danielle van Gladbach wrote: > I am trying to send an array from one php to another: > > $org["index-A"]=17010000; > $org["index-B"]=12090000; > > print "<a > href=\"test2.php?org=".$org."\">test2</a><BR>\n"; > > But if I try to read te array in test2.php, I get "Warning: Variable > passed to each() is not an array ". You can't pass an array thru the URL. What you need to do is serialize() it then urlencode() it (or maybe rawurlencode()). Then you can put the resulting string in the URL. In test2.php you would unserialize() $org ($_GET['org']). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* E Pluribus Unix */

« previous php.general (#131692) next »