How do I count the number of each unique array inside a multidimentional array? PHP

soradesign

New Member
I'd like to build a simple shopping cart using arrays. I need to display each unique item in the shopping cart aswell as the quantity of each item along side.My initial cart array might look like this:\[code\]$cart=array( array(2003,100,"Table") ,array(2003,100,"Table") ,array(2003,100,"Table") ,array(2004,200,"Chair") ,array(2004,200,"Chair") );\[/code\]The first value in each array is the product_id, then the price & then the product name.How do I print each unique item once aswell as the quantity of each along side?Thanks in advance.
 
Back
Top