Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux