Using php and html, how can I count the number of times a selection is made from a drop down list?
<p>The program I'm working on is essentially a receipt maker for a restaurant. There is a drop down list which contains a bunch of foods taken from an array. The array includes the price for each item, and as of right now, the program will display any food item selected from the drop-down, list the individual prices, and add them up for a total. The problem I have is if someone selects the same item more than once, I have no way to register the quantity of said item. Basically, I need some code that checks the current selection against the past selections to see if their are any duplicates. I don't really know how to do that. <a href="https://gist.github.com/3881162" rel="nofollow">Here</a> is my code so far. Please take a look and pass on any advice. Thanks.</p>
