try this...didn't test it, but i think it'll do the trick:

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

jack

Keith wrote:
> 
> Following loop works fine !
> but I don't want $art_nr_1 (which is 4564)
> I want to have $art_nr_$i
> but if you use it you just get 1,2,3,4
> 
> for ($i=1; $i<50; $i++) :
> $varid = "quant".$i ;
> if ($$varid != "") {
> echo
> "
> <input type=hidden name=\"art_nr\" value=\"$art_nr_1\">
> <input type=hidden name=\"quantity\" value=\"$quant1\"> ";
> 
> }
> endfor;
> 
> --
> PHP General 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]

-- 
PHP General 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