This is a trivial question but how can I place a checkbox inside a table row that is being echoed inside php script. Currently I'm getting an error with what I have
here is the code
echo "<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Coalition</th>
<th>Email</th>
<th>Select</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['firstname'] . "</td>";
echo "<td>" . $row['lastname'] . "</td>";
echo "<td>" . $row['coalition'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td><input type="checkbox" name ="selected[]" value="<?php echo $row['id'];?>"/></td>";
echo "</tr>";
}
echo "</table>";
error: Parse error: syntax error, unexpected '<' in C:\wamp\www\Voting\includes\list.inc.php on line 45 (this line is the checkbox)