PHP Lesson-3 Open and Close Tags

Every programing language of web site development has a specific opening tag and closing tag.

In PHP we have tag for opening and that tell the server this file is a PHP, so the server and the browser can process the file information PHP and test every single word and line in that file according to the language parameters. 

There is a closing tag for PHP, too. The closing tag take the role of telling the server or the browser that PHP code ended.

The main purpose of closing tag in PHP is to not mix up any code after that. We learned before that PHP is an applicational programming language. Meaning, the PHP code is always proccessing. Therefore, when we write the closing tag, we can write anything without affecting our PHP code.

See the example of opening and closing PHP code bellow:

<?php //This is an opening tag for PHP code
$varaible = "Text";
?> //and this is a closing tag
//After this tag we can write anything such as HTML code and CSS code.
lesson | open close tags | php

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart