I am trying to caregorize to group at the same time, but its not working. Any hints? Here's my code: $temp="Dummy"; while ($row = mysql_fetch_array($result)) { if($temp !=$row["group_name"]){ $temp=$row["group_name"] ; echo "<b>Group:$temp<br></b>"; } $temp1="blah"; if($temp1 !=$row["service_cat"]){ $temp1=$row["service_cat"]; echo "Services:$temp1<br>"; } $machine_name=$row["machine_name"]; echo "<a href=view_server.php?machine_name=$machine_name>$machine_name</a><br>"; } This is displaying : Group:Group_Name Services:Email Machine_Name Services:Email Machine_name2 Services: Backup Machine_name Group:Group_name2 ........ I dont want to print services multiple times. Just like the group name catagorize it. Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]