Resolving delimiter issue in PHP

A delimiter can be any non-alphanumeric, non-backslash, non-whitespace character.
Often used delimiters are forward slashes (/), hash signs (#) and tildes (~). The following are all examples of valid delimited patterns.
/foo bar/
#^[^0-9]$#
+php+
%[a-zA-Z0-9_-]%

Server side coding can be delimited using any one of below two ways.
1. <? some code ?>
2. <?php some code ?>

It is always good practice to follow the second way, some servers may not allow the first way.

If your already existing code uses first way in many files, you can change the server setting to give support for the first way. It can be done by setting below option in php.ini file.

short_open_tag=on;

Use phpinfo() to find the location of php.ini file in your machine.

Posted in Php