Archived Boards and Threads... > Parham's PHP Tutorials

The short tag '<?' or the long tag '<?php' ?

(1/2) > >>

NathanKP:
Is it better to use the short PHP tag "<?" or the long PHP tag "<?php"?  I've seen both used quite extensively, but I noticed that web hosts have to enable the short tag in php.ini.  Is the short tag usually supported by web hosts, or should I use the long tag to be on the safe side?

NathanKP

codenaught:
I would definitely recommend using <?php. I've never had problems with it, but I will tell you I have had problems using the <? tag before.

NathanKP:
Okay, thanks!

NathanKP

mindphp:

--- Quote from: akabugeyes on October 18, 2007, 11:41:52 AM ---I would definitely recommend using <?php. I've never had problems with it, but I will tell you I have had problems using the <? tag before.

--- End quote ---
if you use <?
php.ini --->short_opentag=On

vBulletin:

--- Quote from: mindphp on November 08, 2007, 02:18:09 PM ---if you use <?
php.ini --->short_opentag=On

--- End quote ---

Thank you, mindphp. :)

Navigation

[0] Message Index

[#] Next page

Go to full version