Long variables

Alles, was PHP betrifft, kann hier besprochen werden.

Long variables

Postby silklink » 17. October 2009 11:58

Can someone tell me if this is still allowed in 5.3

$loadfooter = <<<LOADFOOTER

<div id="footer">
lots of text/html
</div>

LOADFOOTER;
silklink
 
Posts: 2
Joined: 17. October 2009 11:28

Re: Long variables

Postby Nobbie » 17. October 2009 12:24

Why not?

If unsure, run a test.

Or read the manual: http://www.php.net/manual/de/language.t ... ax.heredoc
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Long variables

Postby silklink » 17. October 2009 12:54

Thanks. Resolved now. The word, 'heredoc' (and 'nowdoc') is what I was looking for. I was searching for things like 'long variables' and '<<<' :)

I found a syntax error. Thanks for your help
silklink
 
Posts: 2
Joined: 17. October 2009 11:28


Return to PHP

Who is online

Users browsing this forum: No registered users and 14 guests