I have two tables - category and subcategory, they both have id_category.
In other words, in category:
id_category: 3
category_name: Security
And in subcategory:
id_subcategory: 1
id_category: 3
subcategory_name: Antivirus
I have multiple items in the same category, so I want it to list the items like this:
Security: Antivirus, Spyware, Firewall.
Also, I want it to do the same with other categories, so in the end it will list like this:
Security: Antivirus, Spyware, Firewall.
Multimedia: Audio, Video, Images.
I'm not sure how to do that. I searched around and tried different things but nothing worked for me.