使用EOF的缺点?

I've seen HTML nested within a PHP page written in so many ways... some of which are demonstrated in this page: http://austingulati.com/2010/01/many-ways-to-integrate-html-into-php/

But... I very rarely see HTML and PHP written in unison as follows:

echo <<<EOF
<h1>Welcome</h1>
<p>Hello</p>
<p>{$somePHPVariable}</p>
EOF;

Question:

Is there a fundamental issue with using the EOF approach that I should be aware of?

查看全部
dpw70180
dpw70180
2012/05/01 20:42
  • php
  • html
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

3个回复