From tuxradar.com:
Example 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";
}
?>
Example 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
}
?>
Assume $foo = $bar.
The output is equal on both of them. I don't understand why. Example 2 has no print/echo, as far as I understand that bunch of words should not be understood by the PHP parser without print or echo. So why does it actually get printed when that 'bunch of wards' is seperated by another set of <?php ?> tags, when it normally wouldn't?
I think I'm missing something here that I would like to understand to the core.