PHP MySQL Tutorial
Learn PHP and MySQL

Using PHP Comments

100% of people found this useful
Using PHP Comments

Comment is a part of your PHP code that will not be translated by the PHP engine. You can use it to write documentation of your PHP script describing what the code should do. A comment can span only for one line or span multiple line.

PHP support three kinds of comment tags :

  1. //
    This is a one line comment
  2. #
    This is a Unix shell-style comment. It's also a one line comment
  3. /* ..... */
    Use this multi line comment if you need to.

 

<?php
echo "First line <br>"; // You won't see me in the output
// I'm a one liner comment

/*
Same thing, you won't
see this in the output file

*/
echo "The above comment spans two lines <br>";

# Hi i'm a Unix shell-style comment
# Too bad you can't see me
echo "View the source of this file, you'll see no comments here <br>";
?>

Recent Comments

By: john9 Posted on 03-19-2015 8:01 AM
By: jenefee Posted on 07-11-2015 12:08 AM

After scan some of the articles on your web site these few days, and that i really like your form of blogging. I tag it to my favorites information processing system list and can be checking back shortly. Please cross-check my internet site additionally and let American state recognize what you think that. http://www.dliga.com/

Powered by Community Server (Non-Commercial Edition), by Telligent Systems