Home Logo
Show Full Menu
Hide Full Menu

Adding Comments

Created: 28/09/10 Views: 849 myFave Image

In this tutorial we will quickly learn how to include comments into our PHP script
Comments may seem pretty pointless when you start coding, however after you code more often and you write much longer script you will get to the point when you come back to the code and not have a clue what is what, or what function or loop ends where etc etc, so it is a great idea to write comments whilst you code or comment after each closing tag or bracket.

The comments themselves are not visible on the browser

Here is how we write a comment in PHP
  • // Comment goes here
That's all it takes, 2 forward slashes.

Pretty simple right? That is pretty much there is all to it, but knowing how to write a PHP comment will become very handy, trust me!

back to: Misc

There are no comments