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.
Use phpinfo() to find the location of php.ini file in your machine.