结果中的PHP表

I am trying to nicely format some results but am unsure how best to approach it..

My result sets look like this:

2013-05 Registrations = 379
Players = 270
Minutes = 52734
Average = 195
Registered & Logged In Month 1 = 323
Retained Month 2 = 43%
Retained Month 3 = 23%
Retained Month 4 = 17%
Retained Month 5 = 12%
Retained Month 6 = 9%
Retained Month 7 = 8%
Retained Month 8 = 7%
Retained Month 9 = 7%
Retained Month 10 = 6%
Retained Month 11 = 6%
Retained Month 12 = 5%

And then repeat for the next month....

Ideally I'd like to put these into a table with the year / month as a column heading and the players minutes etc as line identifiers.

Any suggestions would be very helpful.

First echo your beginning table tags, with headers, then iterate over your results, echoing table rows with the content. Then, outside your while loop (or whatever you use), add the closing table tags.