Start and End Tags

•    PHP is designed primarily for dynamic web generation, i.e. for work with HTML. In most cases, PHP commands are inserted directly into HTML code. The interpreter must distinguish where the PHP script starts and ends.
Therefore, PHP always starts with the <?php tag and ends with the ?> tag.
EXAMPLE:

 

<?php

        //here you can insert PHP commands

?>

Code Example
<?php
   //here you can insert PHP commands
?>
Code Playground
PHP
<?php

?>
Lesson Navigation