Non-closing PHP tags in includes?
Hi,
This post is directly targetted at David Powers, who is often here (but, of course, could interest others)...
I'm currently reading the book "Adobe Dreamweaver CS5 with PHP Training From The Source" and I just came accross a strange affirmation:
on page 184, in the "Why the Next Page Doesn't Always Load" sidebar, in the third bullet you state: "If the include file contains only PHP code, remove the closing PHP tag. This is not only legitimate, it's the recommended best practice."... jaw dropping... I've never seen that...
I need more explanations... Why would it be recommended? Wouldn't it break the code (particularly PHP) since there's an opening tag but not a closing one? That means that we could have a lot of opening tags without closing tags? Why would it be different from the code that is "inside" the page, for as far as I know it, includes "include" the code into the page "before running it"? So, doesn't PHP "sees" the same thing whether the code is "embed" in the page or included via the include statement?
Lot of questions, but I need more details, 'cause I'm not sure a Google research on that topic would give me any results...
Nelson
