you could try this:

transmitting end:

<?php
foreach ($keylist as $key => $value) {
   $searchArg .= "keylist[]=".htmlentities($value)."&";
}
?>

<a href="myphp.php?<?php echo $searchArg?>">array from search argument</a>


receiving end:
foreach($_GET["keylist"] as $key => $value) {
   echo "{$value}<br>";
}

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

Reply via email to