Jump to content

HTML table in php


dont_be_hasty

Recommended Posts

Hi,

 

Im coding in php and i want to display my results in a table.

 

Here is my code:

 

echo "<table>";

echo "

    <tr>

<td>$row1['name']</td>

<td>$row2['name']</td>

    </tr>";

echo "</table>";

 

mysql_close();

?>

 

I keep this the following error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 48

 

Line 48 is: <td>$row1['name']</td>

 

 

Any help will be great - Thanks

Link to comment
https://forums.phpfreaks.com/topic/143530-html-table-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.