PHP comments

Normally to understand PHP code we use comments. We use comments to make PHP code more readable and understandable. Suppose you write a complex code and two years later you need to add new functionality in that code. But when you open your code you do not understand the code because you did not use comment in your code.
Below some strategies are given for you. We make comment in two ways.
(1)    One line comment
(2)     Two or more lines of comment.

One line comment
If the comments do not exceed one line then we call it one line comment or single line comment. We use // symbol to represents php one line comment. See the example below
<? Php
/ / This line show the hello everyone
echo "Hello Everyone, This is My First PHP Code";
?>

Two or more line comments
If your comment exceeds one number of line you can use double or more line comments. See the example below.

<? Php
/ * This line show the hello everyone
And also it print my first program
* /
echo "Hello Everyone, This is My First PHP Code";
?>

Comments

Popular posts from this blog

How to construct a B+ tree with example

How to show only month and year fields in android Date-picker?

Visitor Counter Script Using PHP