Ok,
I had sql statment ordered by category_id
So all categories are grouped.
i used mysql_fetch_rows to set $row[n] arrays
so you set $current_cat=""
for statement begins row counting so that script continues until $i=$row_count
the if statement checks to see if $current_cat is not equal to 'row[1]["$category_name"]
on the first pass this will return true so $current_cat = row[1]["$category_name"]
print $current_cat;
back to for loop
now current_cat==row[1]["$category_name"]
if statement returns false...
heres where I fall down,
how do I print all product_names associated with the $current_cat?
how do I get to the next row that starts a new category_name??
thanks, you've helped a bunch already.