[thelist] Okay now stuck on to step #2

ben morrison morrison.ben at gmail.com
Wed Nov 26 12:10:12 CST 2008


on Wed, Nov 26, 2008 at 5:56 PM, Terion Miller <webdev.terion at gmail.com> wrote:
> I get this error:
> *Parse error*: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in
> *C:\Inetpub\wwwroot\NewBeginnings\jobsOutput.php* on line *22
> *
> and this is the code that starts on that line (which I figured was not coded
> correctly):
>
> echo "<table width=728 border=1><tr><td><b>$title<br> <a
> href="$href">$blurb</a></b></td><td><b>$title<br> <a
> href="$href">$blurb</a></b></td><td><b>$title<br> <a
> href="$href">$blurb</a></b></td></tr></table>";

PHP sees this as

echo "<table width=728 border=1><tr><td><b>$title<br> <a
href=" <---------------   the echo ends as there is a " and PHP would
now expect a semi-colon ;

It will then get even more confused..

Change to a single quote or escape your quotes or use a heredoc to
output lots of HTML.

http://www.php.net/manual/en/language.types.string.php

ben



More information about the thelist mailing list