I have a problem,
I want to create a variable wich is save the content of a table,
here is the code:

```html
<?php
    include 'koneksi.php';
     $query = "SELECT transaksi.id as id, transaksi.deskripsi as deskripsi, 
       sum(case when shift='1' then transaksi.jumlah end) as shift1,
       sum(case when shift='2' then transaksi.jumlah end) as shift2,
       sum(transaksi.jumlah) as total
       from transaksi where tanggal='2014-11-15' group by id, deskripsi";
     $data1 = mysql_query($query) or die('Invalid query: ' .mysql_error());
     $no=1;
     while($row = mysql_fetch_object($data1)){
     $output="
     <table>
      <tr>
       <td>".$no++."</td>
       <td>".$row->id."</td>
       <td>".$row->deskripsi."</td>
       <td>".$row->shift1."</td>
       <td>".$row->shift2."</td>
       <td>".$row->total."</td>
      </tr>
     </table>";}
     echo $output;

?>
```

The code above show the result:

```
3   7100-04000  FINISH GOOD 32100-KVY-7000  20  11  31

```

The result show only last record of the query,

It should be like this:

```
1   7100-00000  FINISH GOOD 32100-KZRM-B200 10  9   19
2   7100-03000  FINISH GOOD 32100-KVB-N700  7   8   15
3   7100-04000  FINISH GOOD 32100-KVY-7000  20  11  31

```

Please help, because I want to use $output as $body in php mailer.

Thank you.