Generally we use tags ,
<?php ?>
short_open_tag : It is a configuration directive in php.ini file. It will describe PHP whether the short form (<? ?>
) of PHP’s open tag should be allowed or not.
for php code. php.ini will provide you to enable PHP short tags ( <? ?> ).
PHP.ini allows you the option to use short style opening tags for PHP code blocks e.g. <? instead of <?php.
To activate this feature , we have to open php.ini file from the Xampp server path ( i.e. etc folder in Linux operating system ) and ( php folder in windows operating system ) and search for the following command .
short_open_tag = off .
change the short_open_tag setting to:
short_open_tag=On
Note :
it is not generally advised to use Short Tags as this can lead to future problems when migrating to server that doesnt have short_open_tag enabled.