i have a result set from query execution that first field is the main menu and second field is the submenu and third column field is the description. these are ordered with display priority.
How can i get the main menu as associative array key and remaining two is an elment added to the array and assigned to the key.

problem is that all the emp records arent come in sequence because of order by displaypriority.
plz give me the sugge. that how to write in php
thank u