Did you know there are five different ways to show the beginning of a block of PHP code?
<?php print("hello world"); ?>
<? print("hello world"); ?>
<?="hello world"; ?>
<% print("hello world"); %>
<script language="php"> print("hello world"); </script>
The first one is the most popular, and does not cause any problems with syntax clashing.
Note: To use the shorthand notation (<?) you must have short_open_tag directive on in your php.ini file.
Please subscribe, or else I will cry. Do you really want to make a programmer cry?

Leave a Reply