Grouping results by category
Not one for any time to be spent on, but may be quite simple if you're better with PHP than I am.
I have a table with the structure:
ActivityID, Category, Activity
And have this section to return results:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php do { ?>
<tr>
<td><?php echo $row_ItineraryProfiles['Category']; ?></td>
</tr>
<tr>
<td><?php echo $row_ItineraryProfiles['Activity']; ?></td>
</tr>
<?php } while ($row_ItineraryProfiles = mysql_fetch_assoc($ItineraryProfiles)); ?>
</table>
Which returns:
Category 1, Activity 1
Category 1, Activity 2
Category 1, Activity 3
Category 2, Activity 4
Category 2, Activity 5
Category 2, Activity 6
Is it simple (if you know how) to change that to return:
Category 1
Activity 1
Activity 2
Activity 3
Category 2
Activity 4
Activity 5
Activity 6
?