wyświetlanie wyniku zapytania mysql php z relacją jeden do wielu

Oto przykładowa tabela:

info table
info_id     name  
1           john  
2           peter
------------------------  
details table  
details_id      log                               date  
1            test log for john                  2013-08-01  
1            another log for john               2013-08-02  
2            test log for peter                 2013-08-02

Oto moje przykładowe zapytanie:

SELECT info.info_id, info.name, details.details_no, details.log, details.date 
FROM info JOIN details ON details.details_id = info.info_id 
GROUP BY info.info_id  

A oto ekran, który chcę osiągnąć:

john  
1     test log for john            2013-08-01  
1     another test log for john    2013-08-02  

peter  
2     test log for peter           213-08-02  

Próbowałem użyć pętli foreach, a następnie wykonać inną pętlę foreach wewnątrz pierwszej pętli.

Proszę, pomóżcie chłopcom

questionAnswers(4)

yourAnswerToTheQuestion