- PHP code starts with start tag <?php and end with end tag ?>
- PHP code can also start with short open tag <? .To use this short tag you have to enable short_open_tag in php configuration file “php.ini”
- Before PHP version 7, PHP also supported ASP tags <%, %>, ASP short open tag for <%=, and the script tag <script language="php"> which has been removed from PHP version 7.
- If a PHP file have only PHP codes inside the file then it is preferable to omit the PHP closing tag ?> at the end of the a PHP file.
- Example of PHP Tag
1 2 3 4 5
<?php // Start PHP Tag echo "PHP is easy to learn !!"; echo "PHP code is executed on web server !!"; // End PHP Tag ?>
Output of above PHP code:
PHP is easy to learn !!PHP code is executed on web server !!
28 August 2018
What are PHP tags?
Subscribe to:
Post Comments (Atom)
Featured Post
How to Write PHP code and HTML code within a same file
A PHP file can have both PHP code and HTML code together. Any HTML code written outside of PHP <?php //php code here… ?> Code is ig...
Popular Posts
-
Problem: PHP Startup: Unable to load dynamic library 'C:\\php7\\ext\\php_curl.dll' - The operating system cannot run %1.\r\...
-
joomla login The solution steps are given bellow: Step1: connect your Joomla database with any database tools like phpMy...
-
When a Java program source is compiled, the output of the Java compiler is called bytecode. Many language generate executable code ...
No comments:
Post a Comment