Learn PHP:4-Using Code Comments in Your PHP Scripts

Posted: September 29, 2010 in PHP
Tags:

We add code comments to our php scripts to:

1. Remind us what our code sections are doing long after we have created them
2. In good HTML editors it makes a nice colored divider between code sections
3. Place author name and script creation date information
4. Make it easier for other developers and programmers to adapt and work with your code

Commented lines do not get processed by the browser or PHP. They get skipped over like they do not exist. They are made only for human reading.

Here are the different ways you can place comments in your scripts:

Advertisements
Comments
  1. Ana Jones says:

    I love this website, the information is great and I have bookmarked it in my favorites. This is a well organized and informative website. Great Job!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s