Most common value from associative array


#1

Hello to everyone.
I have gotten some static site for the selling of cremes( where the owner wants the users have a user area where they can change consumer information, where consumers can see previous orders, and most bought products by that customer. The first two things are not the problem, but because I am putting those products into a base like json string, my question is: how do I take the most bought products from the base and print them out? Any sort of tutorial, help is needed. I am willing to even pay for it, just so I can get it done.
This is what the base looks like.

Thank you


#2

If you return the JSON, you can print what is returned through javascript.


#3

Tnank you for answer. Can you give me some example ?


#4

As stated in one of the other forums that you posted this on, the data should be properly normalized and stored with one row for each piece of data. This will let you directly query to get the result you want.