Structuring a Table with the results from CakePHP


i am having a query like


   foreach($report_attrid as & $reportattrid):





1.the first one for $report_attrid will gives me the all the datas needed for my report


       id Report_id title form_id  attribute_id
        1  1         r1    24          69
        2  1         r2    24          72

2.And then foreach attribute_id , i am fetching the Attributes label from my attribute table in the second query $reportattrid['Report']['attr'];

And then Foreach Reports attribute_id i am trying to fetch the entries from my results table using $reportattrid['Report']['value'] which gives as

At first when attribute_id = 69 it returns 2 rows


    id form_id attribute_id value
     1    24       69         A
     2    24       69         B

Then attribute_id = 72 it returns 2 rows


        id form_id attribute_id value
        3    24       72         C
        4    24       69         D

Everything retriving correctly but now

i am trying to build a table to display in my view


       <?php foreach ($Report_attrid as $report1): ?>


      <?php endforeach; ?>
<?php echo $report1['Report']['attr'][0]['Attribute']['label'];?>

  <?php foreach ($Report_attrid as $report2): ?>

                       <?php foreach ($report2['Report']['value'] as $report3): ?>

                               <?php echo $report3['Result']['value'];?>   

                          <?php endforeach; ?>

 <?php endforeach; ?>

which displays me like

     Firstname experience
       A           B
       C           D

but i need the table as

       Firstname experience
        A           C
        B           D

how to do so?? please suggest me...