PHP Tag

PHP Tag

What are PHP tags ?

Basically PHP code can run in Three Types of Tags.

These are:

  1. Canonical PHP tags
  2. Short-open (SGML-style) tags
  3. Script Tag

What are Canonical PHP tags ?
Canonical PHP tags are some times call Default tag because it is by default ON on any server where as other not.
it look like

    

<?php code   ?>
 


What are Short tags ?
Short tags are those tag which does not contain php with <? starting tag. Short tag are by default off on the server in order to use you have to activate or ask server admin to activate it.it looks like

     
<?  code  ?>

What are Script tags ?
Script tags are those tag which contain script tag like < script language=\”php\”>this type of tags are rarely used, it contain a starting tag as well as closing tag like HTML tags
it look like

  

< script language=\"php\">

Code

< /script >   

//

Scroll to Top