Re: [PHP-DB] Variable variables ! - help

2001-03-14 Thread Joe Brown
Seems like you need to try curly braces. ${art_nr}_${i} ""Keith Whyman"" <[EMAIL PROTECTED]> wrote in message 024d01c0ac8f$1a6373c0$0b64a8c0@server">news:024d01c0ac8f$1a6373c0$0b64a8c0@server... > > driving me up the bloody wall ! > I'm sure it's something simple ! > This works fine > > > for ($i

Re: [PHP-DB] Variable variables ! - help

2001-03-14 Thread Keith Whyman
driving me up the bloody wall ! I'm sure it's something simple ! This works fine for ($i=1; $i<50; $i++) : $varid = "quant".$i ; if ($$varid != "") { echo " "; } but the moment I change it to $art_nr_$i it doesn't ??? > sorry I don't think I explained that very clearly ! > The first loop's

Re: [PHP-DB] Variable variables ! - help

2001-03-14 Thread Keith Whyman
sorry I don't think I explained that very clearly ! The first loop's on a page which works fine, and it's in a form with article numbers and then an input field for quantites ! It's the next page that's giving me headaches ! The user submitted the form with all article numbers and some with a quan

Re: [PHP-DB] Variable variables ! - help

2001-03-14 Thread Russ Michell
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 = ""; if ($art_nr1 != '') { $i++; $display_this .= " "; I've no

Re: [PHP-DB] Variable variables ! - help

2001-03-14 Thread Keith Whyman
I've got a loop which includes the following coming from mySQL if ($art_nr1 != '') { $i++; echo " "; 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