varois83 wrote:
I am fairly new to PHP/mysql and was reading an online tutorial and
learned that my short tags weren't enabled.
At this time I have no need for them, my setup apache/mysql/php runs
on my PC just to test code.
Shall I enable short tags or not?
You're asking one of the "religious" questions--you won't be getting
fair answer here.
You can enable short tags. Short tags are cool and fast (in terms of
coding and execution). When short tags are enabled, you _may_ encounter
some problems when you're outputting XML codes via PHP; this however
can be solved by coding in "such a way".
Most of the servers should support short tags; but there may be few
that don't support.
If you use short tags and if the server doesn't support it, you can
easily do search and replace (ie, <?= to <?php echo). But, there may be
few or many dumb clients who may not be knowing how to handle this
situations.
Personally, though I'm (still) a good fan of short tags, now I'm
moved to long tags. My suggestion is to enable short tags, but to code
in long tags--so that you achieve wide range of compatibility. (If you
disable short tags but did try to output XML, there are chances such
PHP code may not be usable when running on servers with short tags
enabled).
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog:
http://rajeshanbiah.blogspot.com/