Jump to content


Multiple Items item_number?

  • This topic is locked This topic is locked
1 reply to this topic

#1 yaari2k



  • Members
  • Pip
  • 2 posts

Posted 20 January 2003 - 08:57 AM

If the naming convention for each item goes by:

item_number1, item_number2...
quantity1, quantity2...

Then how would I create a while_loop for multiple items? Say I have a user who buys 3 out of 5 possible items on the site, where would I fit in the while loop?

#2 franng



  • Members
  • Pip
  • 3 posts

Posted 21 January 2003 - 01:45 PM

if you know how many, then you can use for loop;
if not, you can use while loop and specify a condition to terminate the while loop and you can use

echo '<input type=hidden name="item_number'.$cnt.'" >"';

where $cnt is the loop count!
hope it can help!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users