Re: Passing an array as a hidden variable
| From: | itoctopus | Date: | Sat, 12 May 2007 12:27:57 +0000 |
| Subject: | Re: Passing an array as a hidden variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254847@lists.php.net to get a copy of this message | ||
hmmm,
anyways, to do that you can just join the array using
$str_attend_save = implode('|', $attend_ary_save);
<? echo '<input type="hidden" name="str_attend_save" value=' .
$str_attend_save .'>'; ?>
On your action page, you do this:
$attend_ary_save = explode('|', $_POST['str_attend_save']);
--
itoctopus - http://www.itoctopus.com
"Todd Cary" <todd@aristesoftware.com> wrote in message
news:C3.71.20961.A3845464@pb1.pair.com...
> When I use the following syntax, the 2 dimensional array loses it's
> contents. Can an array be passed this way?
>
> <? echo '<input type="hidden" name="attend_ary_save"
value=' .
> $attend_ary_save .'>'; ?>
>
> Todd