| Home > Computer & I'net > Comments... |
Comments | |
There are two different types of comment tags. One type will comment out a single line of coding, the other will comment out a block of coding lines. Single lines of coding may be commented using two slashes // or using a hash # symbol. This type of commenting may be used to comment out a full line, or the remainder of a line. <?php // This is an example of commenting. # This is also an example of commenting. echo "This text will appear on the web page. <br />"; // echo "This text will not appear."; echo "Some more example text."; // That prints, not this. ?> Outcome : This text will appear on the web page. Some more example text. Commenting more than one line of coding is done using /* and */. Everything between these two tags will be commented. They can be used on a single line to many lines. <?php echo "This is a commenting test below. <br />"; /* echo "This text will not appear."; echo "Neither will this."; */ echo "This is a commenting test above."; ?> This is a commenting test below.
This is a commenting test above. ----------------- Article by David Stanley. Visit his site http://www.htmlite.com. Reprinted with permission. | |
| Articles |
•Auto & Trucks•Business•Computer & I'net·General·Apache·CSS·Database·Hardware·HTML·Javascript&DHTML·Linux·MySQL·Operating System·Perl / CGIPHP·Programming·Publishing·Search Engines·Software Problems·SSI·Tips & Tricks·Utilities·Web Design•Family•Food & Drink•Gardening•Health•Other•Pets•Psychology•Spiritual•Travel•Women |
| Calculators |
|