tuxradar.com から:
例 1:
<?php
if ($foo == $bar) {
print "Lots of stuff here";
print "Lots of stuff here";
print "Lots of stuff here";
...[snip]...
print "Lots of stuff here";
print "Lots of stuff here";
}
?>
例 2:
<?php
if ($foo == $bar) {
?>
Lots of stuff here
Lots of stuff here
Lots of stuff here
...[snip]...
Lots of stuff here
Lots of stuff here
<?php
}
?>
$foo=と仮定し$barます。
出力はどちらも同じです。理由がわかりません。例 2 にはprint/がありませんecho。私が理解している限り、一連の単語はprintorなしでは PHP パーサーによって理解されるべきではありませんecho。<?php ?>では、通常は印刷されないのに、「病棟の束」が別のタグのセットで区切られている場合、実際に印刷されるのはなぜですか?
ここで、核心まで理解したいことが欠けていると思います。