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

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

I've now got the following 
art_nr_1=12456
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 != "") {
echo
"<input type=hidden name=\"art_nr\" value=\"$art_nr_$i\">
<input type=hidden name=\"quantity\" value=\"$quant$i\"> ";
}
endfor;  

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