I have been trying to figure out how to get this to work for a couple of days. I need to sort the results of a DB query based on the hierarchy of positions within an organization. Since they are not necessarily alphabetical, the best I can come up with is to assign a numerical value in a separate table to each position, and reference that to sort it. Is this the best way to do this? Or is there some other trick someone can clue me in on? My code now runs the query, and with a while ($row = mysql_fetch_assoc($result)) { *put results into an array* } statement I put each entry into an array then I sort it like so. array_multisort($array); $count = 0; while (isset ($array[$count])) { *display results in a table* $count++; } Thanks, Don