Ok, I don't know if you already solved this, but you might want to do
something like
$SerKeylist=rawurlencode(serialize($keylist));
print "<a href=\"/myscript.php?SerKeylist=$SerKeylist\">link</a>";
on the source end and
$keylist=unserialize($_GET["SerKeylist"]);
at the destination. This of course will build quite an URL for large
arrays, so you might consider using a bit of JavaScript and a form at
the source end in order to use POST instead of GET if needed.
HTH
Bogdan
David T-G wrote:
> Hi, all --
>
> I collect field keys in an array that looks like
>
> $keylist = array('comment','job','spaced out key name','foo',...) ;
>
> and would like to pass the array to myself in a call like
>
> print "<a href=\"/myscript.php?keylist=$keylist\">link</a>" ;
>
> but when it's actually run it of course says
>
> ...keylist=Array...
>
> which is quite bad. I'd use a simple scalar
>
> $keylist = "comment job spaced out key name foo ..." ;
>
> but, of course, those darned fields which have spaces embedded in the
> names will really mess that up.
>
> How can I pass myself an array -- and recognize it on the receiving end?
>
>
> TIA & HAND
>
> :-D
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php