Hi, I have a 3D array that I'm trying to traverse and wondering the best way to group results? The query returns
category | item | note
3 | 1200 | socks
3 | 1440 | stockings
8 | 400 | wool hat
How can I group these?
while($row = mysql_fetch_assoc($result))
{
$this_fund = $row['category'];
if($this_fund != $row['category'])
{
echo "\n $this_fund";
$this_fund = $row['category'];
}
}
Or build a tough array?