我見過HTML嵌套寫在很多方面......其中一些在此頁面演示了PHP頁面中: http://austingulati.com/2010/01/many-ways-to-integrate-html-into-php/使用EOF的缺點?
但是......我很少看到HTML和PHP編寫的齊聲爲如下:
echo <<<EOF
<h1>Welcome</h1>
<p>Hello</p>
<p>{$somePHPVariable}</p>
EOF;
問:
是否與使用EOF辦法,我應該知道的基本問題?
[定界符](http://en.wikipedia.org/wiki/Here_document) –
退房http://stackoverflow.com/questions/5673269/is-there-a-reason-to-use-heredoc-在PHP中 - 它應該回答你的問題。 – Crontab