I have a query that gives this array, 

```
Array ( 
    [0] => Array ( 
        [id] => 1 
        [name] => name1 
    )

    [1] => Array ( 
        [id] => 2 
        [name] => name2 
    ) 

    [2] => Array ( 
        [id] => 3 
        [name] => name3 
    )
 )

```

When this is returned to a HTML page and made a foreach, It duplicates the table into 3 tables .

```
<?php foreach ($types AS $row_types) { ?>
<table class="table_style1">
    <tr>
        <th>Title</th>
        <th>Title2</th>
    </tr>
    <tr>
        <td><?php $row_types['name'][0]?></td>
        <td>data 1</td>
    </tr>
    <tr>
        <td><?php $row_types['name'][1]?></td>
        <td>data 2</td>
    </tr>
    <tr>
        <td><?php $row_types['name'][2]?></td>
        <td>data 3</td>
    </tr>
</table>
<?php } ?>

```

please help me to show only 1 table here.