Hi there:

Not sure this'll work but it's some way towards it I would think:
(Note all occurances of the variable: '$display_this'

//Start off the display item outside the loop
$display_this = "<form>";
    if ($art_nr1 != '') {
    $display_this .= "
    <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 != "") {

//Continue 'building up the varuable:

$display_this .=
"<input type=hidden name=\"art_nr\" value=\"$art_nr_$i\">
<input type=hidden name=\"quantity\" value=\"$quant$i\"> ";

//Echo thwe variable to the page
<?php echo"$display_this"; ?>

         "Believe nothing - consider everything"        
  Russ Michell
  Anglia Polytechnic University Webteam
  +44 (0)1223 363271 ext 2331

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