Here is the structure of my MySQL table.
I have many results. Many of them have same Brand
for example many of them have Brand
- Orrange
, many of them have Brand
- Oddiboss
and Brand
- Guma
.
So my question is how can i display them like this:
I think i have to use while loop
.
$r = mysql_query("SELECT * FROM `products`");
while($rowi = mysql_fetch_array($r))
{
$id = $rowi['id'];
$Title = $rowi['Title'];
$Brand = $rowi['Brand'];
}
So with this MySQL quesry i can fetch all the results but i can not group them into 3 results displaying how many occurencies everyone have.
I hope you understand what i need.