Home arrow Tutorials arrow PHP - Using Comments

Web Development

Welcome to Web Development section. Please choose a category. 
 
  • Hrvatski tutorijali
    Ovdje su objavljeni razni tutorijali na hrvatskom jeziku na temu PC, programiranje, web development, savjeti, trikovi, optreba racunala itd.
  • Tips / Tricks
    Articles about various tips and tricks concerning Windows, Linux and other OS usage.
  • JavaScripts
    Code snippets, tutorials and tricks for JavaScrip language.
  • PHP & MySQL
    Tutorials, code examples, tips and tricks for PHP and MySQL development.
  • Tutorials
    Place for tutorials about using various application in best and simplest way.
PHP - Using Comments Print E-mail
(2 votes)

PHP - Using Comments
Sunday, 10 June 2007
Using 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>";

?>


 
< Prev   Next >
What's your favorite Internet browser?
 

Login






Lost Password?
No account yet? Register

Tools

Free Link Exchange

Partners

Syndicate