Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in
| From: | Mark Sargent | Date: | Fri, 26 May 2006 03:26:18 +0000 |
| Subject: | Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-236924@lists.php.net to get a copy of this message | ||
Hi All,
I get the error for line 15 for this code,
<?php
15 echo "<font face='"$_SESSION['font']"'";
16 echo " size='"$_SESSION['size']"'";
17 echo " color='"$_SESSION['colour']"'>";
18 echo "$_SESSION['text']";
19 echo "</font>";
20 ?>
I have put ' ' quotes around the " " quotes for each font attribute so that the parser doesn't think the echo is finished too early. Is that wrong? I know that this code would get tedious for lots of text and CSS would be better, but, it's just a little study project from the book I'm following. Cheers.
Mark Sargent.