0
$row = mysql_fetch_row($result);

echo <<<_END 
<pre>
<ul> <li> $row[2] <li> <ul>
</pre>
_END;

The error is:

Parse error: syntax error, unexpected '<<' (T_SL) in C:\xampp\htdocs\mobile\home.php on line 64

I dont understand what is wrong? The _END: is on the far left with no white spaces

1 Answer 1

3

I copied your code and found out: You have a whitespace after <<<_END ;) Remove it and it works.

As a sidenote: You should not use such abstract identifier like END, or STRING, or such. use identifiers, that describe the content, like (in your case) HTML. Some IDEs (like PHPStorm) can even highlight code depending the identifier used.

Sign up to request clarification or add additional context in comments.

1 Comment

I cant believe that is even an issue - Ty I will remember that!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.