Sabha Sabha - 1 year ago 101
PHP Question

Adding a html message

I am getting

Parse error: syntax error, unexpected 'text' (T_STRING) in /home/xxx/public_html/sample.php on line 243

line 243 is the one with

$message = "
<h1 style="text-align:center;color:blue;">Congratulations !</h1>

I dont see anything wrong in this. Can someone help?

Answer Source

Use single quote inside style attribute:

$message = "<h1 style='text-align:center;color:blue;'>Congratulations !</h1>";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download