I've got a loop which includes the following coming from mySQL

    if ($art_nr1 != '') {
    echo "
    <input type=\"hidden\" name=\"art_nr_$1\" value=\"$art_nr1\">
    <input type=\"text\" name=\"quant$i\" size=\"3\" maxlength=\"5\">

I've now got the following 
quant1="" or 1 or so

And now comes the bit which doesn't work !

for ($i=1; $i<50; $i++) :
$varid = "quant".$i ;
if ($$varid != "") {
"<input type=hidden name=\"art_nr\" value=\"$art_nr_$i\">
<input type=hidden name=\"quantity\" value=\"$quant$i\"> ";

This gives the result
<input type=hidden name="art_nr" value="1">
<input type=hidden name="quantity" value="1"> 
which is unfortunately not what I want !
I'm sure it's easy but can someone please help ! 

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to