-1

I have the following code.

echo "<table>
<tr>
    <td class="tablehead">Name
    </td>       
    <td class="tablehead">Email
    </td>
    <td class="tablehead">Comment
    </td>
</tr>";

and corresponding code in linked css file to turn content of tablehead class white against coloured background. Running this on the browser is returning this error.

Parse error: syntax error, unexpected 'tablehead' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\index.php on line 110. (line 110 is line 3 of this code pasted here.)

Why? What do I do?

TIGER
  • 2,864
  • 5
  • 35
  • 45

1 Answers1

0
echo '<table>
<tr>
    <td class="tablehead">Name
    </td>       
    <td class="tablehead">Email
    </td>
    <td class="tablehead">Comment
    </td>
</tr>';

use ' instead "

anshuVersatile
  • 2,030
  • 1
  • 11
  • 18