Sabha Sabha - 1 year ago 77
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?


Use single quote inside style attribute:

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