Hey, OK, got it, thanks! -Ryan
On 1/4/2004 1:00:04 AM, Aidan Lister ([EMAIL PROTECTED]) wrote: > Firstly > I'd rewrite your other script to store the data in an array. > > The benefits of doing so are simply demonstrated: > > <?php > foreach ($products as $product) > dosomethingto($product); > ?> > > However, if you are unable to rewrite your script: > > The correct syntax is: > <?php > ${'product' . $i} > ?> > > "Ryan A" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > am a bit confused as to how you do this...first let me explain the flow of > > input: > > I will be getting $product1,$product2,$product3 etc from another > script...I > > dont know till what number....right now I am trying to catch the values > till > > 20 with a "for" loop. > > > > My problem is how do I attach the $i that I am using to the $product to > > check if its set? Heres my code and below that you will see some of the > > stuff I have tried: > > > > > > for($i=1; $i<21; $i++) > > { if(isset($product$i)) > > {echo "Product".$i." is set!<br>";} > > else(!isset($product$i)) > > {echo "Product".$i." is NOT set!<br>";}} > > exit; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php