View Full Version : Problems with using a loop

Jay Vincent
01-23-2004, 11:40 PM
Hey, I posted earlier, but I didn't get a very good response :( so I tried to have a go to improve my scripting but I've hit another problem:

array("Osiris","60","An awesome shoe","osiris.jpg"),
array("Etnies","70","An awesome durable shoe","etnies.jpg")

print ("<table cellspacing=0 cellpadding=0 border=0><tr><td rowspan=3><img src=".$product[0][3]." width=150 height=100></td><td><b>".$product[0][0]." </b></td></tr><tr><td>".$product[0][2]."</td></tr><tr><td>".$product[0][1]."</td></tr></table><p>");


Thats what I've got so far. What I need to be able to do is repeat the 'print' for the same amount of sub-arrays (so 2 times in the example), and for every time it repeats, the number in the first [ ] increases by one. example:

so first time it would be $product[0][3]
second time it would be $product[1][3]

I hope that makes good sense, I anticipate your replies :)
Thanks guys

Jay Vincent

01-24-2004, 01:29 AM
Please do not create multiple threads on the same topic. Your previous thread was created just today. Not everybody on the forums is on here at the same time as you as they are all in different time zones around the world.

All replies can go in the previous thread...


Closing thread...