PHP - Comments

There are 02 comments used with PHP scripts.

  1. Single line Comment
    Single line comments can be specified by //
    Ex:

    <?php
    // This script print Hello World in the browser

         echo "Hello World"
    ?>
  2. Multiple line Comment
    Multiple Line Comment begins with "/*" and ends with */.
    Ex:

    <?php 
    /* This is a multiple line comment You can comment
    any no of lines within this block
    */

         echo "Hello World"
    ?>

No comments:

Post a Comment