Page 1 of 1

<? ?> vs. <?php ?>

Posted: Fri Aug 03, 2007 7:37 pm
by trassalg
Is there any difference between using one set of tags or the other, or do they do the same thing? I'm wondering if they're slightly different in the say single and double quotes differ.

Posted: Fri Aug 03, 2007 8:11 pm
by John Cartwright
<? ?> are called short tags, and are dependant on the short tags options being enabled in your php.ini (which isn't always the case). It is best always to use <?php ?> tags.

..oh ya short tags will be deprecated in php6