Ron,
What I do is this:
Firstly, $howmany is passed as a final loopcounter from the form.
for ($index = 1; $index < $howmany; $index++){
$varname = 'varname'.$index;
$varname = $_POST[$varname];
//repeat process for $vars and do something
}
It works for me.
George in O
Herhuth, Ron wrote:
for($i=0;$i<$_POST['numberOfAmendments'];$i++)
{
$amendmentNumber = $_POST['amendmentID_$i'];
}
Replace your single quotes with double quotes. Variable substitution is
not performed on single-quoted strings.
--
Stuart
--
PHP Windows Mailing List (http://www.php.net/)
To unsub
You either have to use double quotes to get $i parsed like this:
$amendmentNumber = $_POST["amendmentID_$i"]; or you can use single
quotes but you have to use $i as variable and not as part of a string
like this: $amendmentNumber = $_POST['amendmentID_'.$i];
Cheers,
/Donatas
Herhuth, Ron wrote
Syntax error. Try instead
$amendmentNumber = $_POST['amendmentID_'.$i];
HTH
Ignatius
_
- Original Message -
From: "Herhuth, Ron" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 16:58
Subject: [PHP-WIN] building a string question
I am