This is kind of hard to explain what i mean but here goes....

i have a table with a number of people, similar to an address book... i would like to sort them alphabetically by name, grouped by the city they live in but i would like the output to be like so in the html

CITY #1 - New york

Person #1's detail - from new york
Person #3's detail - from new york

CITY #2 - LA

Person #2's detail - from LA

CITY #3 - Chicago

Person #3's detail - from Chicago

- now i already know how to get information from the database and what not, and i know the html for it, but what i cant figure out is how do i have it spit out each City and put the people under that city that live there

Hope this makes some sense