In an HTML page, all PHP code must be enclosed within either of the three special markup tags recognized by the PHP Parser.
- <?php PHP code goes here ?>
- <? PHP code goes here ?>
- <script language=”php”> PHP code goes here </script>
- Amongst these <?php…?> is the most commonly used tag.
- We can chain as many statements as required separating them with semicolons as shown below.
<?php
echo “Hello World”;
echo “A second statement”;
?>