Re: [PHP] Re: PHP in HTML code

[email protected] ("Jan G.B.")
Newsgroups php.general
Message-ID <[email protected]>
2010/3/18 Ashley Sheridan <[email protected]>

> Technically, PHP isn't embedded in any language; it's the other way around.
>
> XML and PHP are used together more often than you might realise. Consider
> Ajax and RSS, which are becoming more and more popular. Also, there are
> sites out there that are almost entirely XML-based; just have a look at the
> World of Warcraft (yes I play it!) website.
>
> Sure - XML is often used and served.
But in general, a web server only parses PHP-Files (ie. .+\.php\d?) unless
you configure your server to parse any file or .xml files. So the XML <? is
not a problem at all for the interpreter.



> For me, I originally learnt PHP using the <?php tags. I only found out
> about short tags when I first ran into the problem with them on shared
> hosting that had them turned off. To me, it didn't make much sense in using
> something that wasn't portable. For the same reason, I try to avoid using
> obscure PHP modules when I know a system will end up on a closed hosting
> platform like this.
>
>
My opinion to this is that I seperate markup from code. I use a template
system in my .tpl files and these will never get parsed. Inline PHP is not
my choice.
But when I'm about to update a project that is written with inline php, I
appreciate the short tags for their ease of use. I also enjoy typing less.
:-)

Regards
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.