Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

PHP Programming/formatting notes

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

PHP Programming/Commenting and Style Commenting in PHP is simple and effective. Writing notes to yourself, within your code, is the only way to keep track of a large file. Coming back to an uncommented 300-line page of code can be a nightmare. To insert a single line comment within php code type // before the line. To insert a multi-line comment within code start the comment with /* and end it with */. For example: <?php $example = 1 //this is a comment that will be ignored. But will help me remember what the code means. if (!randomfunction($_POST[dart])){function(example); $example ++;} /*This is a long multi-line comment that will help me remember what the code means. It will be ignored by the php- parser*/ randomfuction($example); ?>