Re: [PHP3] array
| From: | (Richard Lynch) | Date: | Sat, 10 Jun 2000 00:42:53 +0000 |
| Subject: | Re: [PHP3] array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1523@lists.php.net to get a copy of this message | ||
In article <00060510435201.08079@jolly.mpipks-dresden.mpg.de>,
aardvark@mpipks-dresden.mpg.de (Reiner Peterke) wrote:
> i have an array of values. i go to a new page, i want to beable to see the
> values if the array there. i tried using:
>
> printf("<input type=\"Hidden\" name=\"astra\"
> value=\"$astra\">\n");
>
> this just ends up in the variable $astra containing the string "Array", not
> the data that was there to be gin with.
>
> how does one get the contents of an array from one page to another.
This is in the FAQ, I think...
<?php
while (list($k, $v) = each($astra)){
echo "<INPUT TYPE=HIDDEN NAME=astra[$k] VALUE='", htmlEntities($v),
"'>\n";
}
?>
It's for sure in all the code sample archives. I put it into most of 'em
by now. :-(
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)