How can i output like this structure

Hi, I need some help please, how can i get this kind of output.


president
john                 mill
michael           kane

vice-president

Marish          Karpov
Mallia           Konsipe

secretary
Josh            Freeman
Honey         Leejirxia


here is my table structure

officials_tbl


of_id         auto_incrment
of_name
of_lname
of_age
pos_id

position_tbl


pos_id         auto_incrment
position


voting_tbl


of_id
pos_id
vote_count

I tried inner join but the output is somethng like this.


president
john                 mill
president
michael           kane
etc....
......



Thank you in advance

Loop through the query output in your scripting language (PHP?) and create the output the way you want it.