Wow....thanks...this is very close....but I have a few questions....
1) How can I replace the lines with a graphic for each group? For example....a graphic that has the name of the office.....than the group results?
2) I also need to print out more data about the group. This is basically a database a real estate agents. I would like to be able to display images, bios, and name data from the group. What I have is below.....you will see that I tried to echo $row[agent_pic]
$result = mysql_query("SELECT * FROM agents where office_name='Coldwell Banker 1'
or office_name='Coldwell Banker 1'
or office_name='Coldwell Banker 3'") or exit(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
$office_name[$row['office_name']][] = $row;
}
foreach ($office_name as $key => $value)
{
foreach ($value as $sub_key => $sub_value)
{
echo $key . ' (result)<br>';
echo $row[agent_pic];
}
echo '<hr>';
}
I really appreciate your help! Thanks