Loading...
PHP

Declaration Style Tags of PHP

Basically in PHP we have four different types of declaration style tags.

  1. Universal Style Tags: This tag supports all functionalities of PHP
    Syntax:
    <?php
    php code
    ?>
    Example:
    <?php
    print(“Universal Style”);
    ?>
  2. Short Open Tag: It supports very few functionalities of PHP
    Syntax:
    <?
    php code
    ?>
    Example:
    <?php
    print(“Short Open”);
    ?>
  3. ASP Style Tag: We can include PHP script within the ASP declaration.
    Syntxx:
    <%
    //script
    %?
    Example:
    <%
    print(“ASP Style”);
    %>
  4. Script Style Tag: It is very similar to the java script declaration.
    Syntax:
    <script language= “php”>
    //Script
    </script>
    Example:
    <script language=”php”>
    print(“Script Style”);
    </scrip[t>

Leave a Reply

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