Re: How to create a array with Form Fields?
| From: | Web Master | Date: | Wed, 06 Sep 2000 17:11:29 +0000 |
| Subject: | Re: How to create a array with Form Fields? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15568@lists.php.net to get a copy of this message | ||
for($i=0;$i<10;$i++):
echo "<input type='text' name='campo[$i]'><br>";
endfor;
Santhyago Bueno Gallao wrote:
> Can i do this? Is this code correct?
>
> for ($i = 0; $i < 10; $i ++)
> {
> printf('<input type="text" name="campo[%d]">',$i);
> }
>
> //--------------------------------------------------
>
> And get the values:
>
> for ($j = 0; $j < 10; $j ++)
> {
> $soma = $soma+$campo[$j];
> }
>
> Please, help me.
>
> Tks.
>
> ------------------------------------------------------------------------
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net