PHP Comments - How to write comment in PHP


PHP Comments- How to write comment in PHP

In this I will explain how you can comment in php code.
The structure of PHP

Using Comments in PHP

There are two ways you can comment out your code one is single line comment and second is multiple line comment.

Single line comment   ( //  )

You can use single line comment anywhere in the code for multiple use
// this is a single line comment
// $x=20;

Multiple line comment

This comment is mostly used by developer to comment out a entire section from the PHP file
<?php
/* 
This is a multiple line
Comment
This will not be shown
Or reflected in your output
*/

?>
Share on Google Plus

About Rahul Rana

I am an experienced web designer and SEO expert. I am running my own online marketing company i.e "SEO To Web Design". Thanks for reading, keep sharing online marketing and web design knowledge.
    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment

Enter your email address:

Delivered by FeedBurner