Topic: Formatting a table correctly

I've got some data grouped by week in an object

Like so....

<% @actuals.sort.each do |week_ending, actuals| %>
  <h2><%= week_ending %></h2>
  <% for actual in actuals %>
     <p><%= actual.week_ending %> - <%= actual.obs_name %> - <%= actual.total_hours %>
  <% end %>
<% end %>

Results in....
2007-11-30
Program A - 2.0
Program B - 15.5

2007-12-07
Program A - 2.5
Program B - 20

I'd like to get it in a table so the table is formatted as:
 
                        2007-11-30        2007-12-07             Total
Program A               2.0                     2.5              4.5
Program B               15.5                    20               35.5


Assuming that doesn't get mangled when sent, how can I format a table that way?  Any thoughts?

Re: Formatting a table correctly

I'm not sure if this will work, but you could possibly do something like the following:

<table>
  <tr>
    <% for ending in week_ending %>
      <th><%= ending %> </th>
    <% end %>
    <th>Total</th>
  </tr>
  <% for actual in actuals %>
    <td><%= actual.week_ending %></td>
    <td><%= actual.obs_name %></td>
    <td><%=actual.tatal_hours %></td>
  <% end %>
</table>