>>>>> "Dave" == Dave Alger <[EMAIL PROTECTED]> writes:
Dave> Hi all, This one is causing me a few headaches. How should I Dave> be doing this? Dave> On my previous page I've created a series of fields using a Dave> loop so that a field is created like this: Dave> echo "<hr>$fieldname:<input name='Field$n' maxlength='25'>"; Here's a way to do it so that the field numbers are not required to be contiguous. You don't really have to copy $_POST to $myPostVars except that, in the code from which this snippet was extracted, there are further processing steps which depend on the fact that none of the form variables left in $myPostVars have been processed yet. ,---- | | $myPostVars= $_POST; | | reset ($myPostVars); | while (list ($key, $val) = each ($myPostVars)) { | if (preg_match("/^Field[0-9]+", $key )) { | list($i)= sscanf($key, "Field%d"); | FieldAry[$i]= $val; | unset($myPostVars[$key]); | } | } `---- -- no toll on the internet; there are paths of many kinds; whoever passes this portal will travel freely in the world -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php