I am outputting results from a table with multiple columns. So I used a foreach loop to loop through but it is returning double results. Here is my code:
<?php
while($row=$stmt_header->fetch(PDO::FETCH_BOTH)) {
?>
<tr class="odd gradeA">
<form action='semesters.php' method='post'>
<?php
foreach($row as $k)
{
echo '<td>'. $k . '</td>';
}
?>
</form>
</tr>
<?php
} ?>....
Any help is appreciated