I created a table in php but when I try to display it, I got an error.
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo "
<table style=\"width:100%\">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Salary</th>
</tr>
<tr>
<td>$row[\"Fname\"]</td>//I got error here.
<td>$row[\"Lname\"]</td>
<td>$row[\"Salary\"]</td>
</tr>
</table>";
}
Error is syntax error. Since I am new in PHP, I couldn't find the error. Eclipse just shows me that there is an syntax error and it won't fix it. Anybody have an idea?