how to implemenet comments in php code example
Example 1: comment in php
Comments in PHP can be used for several purposes, a very interesting one being that you can generate API documentation directly from them by using PHPDocumentor (http://www.phpdoc.org/).
Therefor one has to use a JavaDoc-like comment syntax (conforms to the DocBook DTD), example:
<?php
/**
* The second * here opens the DocBook commentblock, which could later on<br>
* in your development cycle save you a lot of time by preventing you having to rewrite<br>
* major documentation parts to generate some usable form of documentation.
*/
?>
Some basic html-like formatting is supported with this (ie <br> tags) to create something of a layout.
Example 2: comments in php
//For a single line comment use //:
//this is a comment too
//for multi-line comments use /* and */:
/* <--start of multi-line comment
this is a comment
this is a comment too (end of multi-line comment)-->*/