Re: Another hand wringer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, February 18, 2007 3:06 pm, jekillen wrote:
> iterator $i and given a_$i+1 names. If I test for the field names
> on post literally, a_1, a_2, a_...n, the values are getting posted
> properly.

Save yourself a LOT of headaches and index-munging and just do this:

<input name"a[1]" value="whatever" />
<input name"a[2]" value="whatever" />
<input name"a[3]" value="whatever" />

Then:
$a = $_POST['a'];
//$a is now an array with indices 1, 2, and 3.

The time you spend re-writing it this way will be paid off almost
immediately.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux