I have a table whose structure is something similar to this
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
I want to be able to use PHP's flush function to print out columns by columns as the data is coming out. So in this example I want it to print First Name, Jill, Eve, and then second column; Last name Smith; Jackon, and so on and so forth.
I don't want to wait until the data is loaded (the script takes a while and the whole point is to have it echo out while its running) and I don't want to deal with AJAX.
The only thing I could think of was using a bunch of go to's (I know thats a terrible implementation). Anyone have any thoughts?