Re: More $_ array question...
| From: | Tim Ward | Date: | Fri, 06 Dec 2002 17:16:16 +0000 |
| Subject: | Re: More $_ array question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127287@lists.php.net to get a copy of this message | ||
not quite ...
if the form elements are (e.g) <input name='array[0]' ...>, etc.
then you need $_POST["array"][0] to refer to the element
(just like any other array of arrays in PHP).
but you're right about count($_POST["array"]) ...
and foreach ($_POST["array"] as $key=>$value), etc.
Tim Ward
http://www.chessish.com
mailto:timward@chessish.com
----- Original Message -----
From: Mako Shark <phpman2000@yahoo.com>
To: <php-general@lists.php.net>
Sent: Friday, December 06, 2002 5:03 PM
Subject: [PHP] More $_ array question...
> If I want to access an array of something from a form,
> is it true that I just have to use
> $_POST["array[$counter"]? So I can legitimately do a
> count() of this array, like count($_POST["array"])?
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>