Jump to content

[SOLVED] Error Message Help


ambo

Recommended Posts

Parse error: parse error, unexpected T_LNUMBER, expecting ',' or ';' in /home/content/m/h/p/mhpmavrick/html/Pages/Decura/home.php on line 78

echo "<table width="243" cellspacing="0" cellpadding="0">

 

  <tr>

    <td width="74">Name</td>

    <td width="169">{$row['name']}</td>

  </tr>

  <tr>

    <td width="74">Email</td>

    <td width="169">{$row['email']}</td>

  </tr>

  <tr>

    <td width="74">Gender</td>

    <td width="169">{$row['sex']}</td>

  </tr>

</table>";

Link to comment
https://forums.phpfreaks.com/topic/124578-solved-error-message-help/
Share on other sites

you're using quotes improperly, escape them or use single quotes... you can see your error with syntax highlighting.

 

See:

echo "<table width="243" cellspacing="0" cellpadding="0">

  <tr>
    <td width="74">Name</td>
    <td width="169">{$row['name']}</td>
  </tr>
  <tr>
    <td width="74">Email</td>
    <td width="169">{$row['email']}</td>
  </tr>
  <tr>
    <td width="74">Gender</td>
    <td width="169">{$row['sex']}</td>
  </tr>
</table>";

You've got double quotes inside a double quoted string there.  You can do this to make it work:

 

echo "<table width=\"243\" cellspacing=\"0\" cellpadding=\"0\">
... and so on

 

A backslash in front of every double quote.

 

Another option is to use single quotes in your html or just omit the quotes altogether (html perfectionists won't like that of course :P )

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.