Writing Comments

Writing the executed PHP code itself is only a part of the programming process. A secondary but still crucial aspect to dynamic Web site development involves commenting your code.

In HTML you can add comments (which are viewable in the source but not in the browser window) using (compare Figure 1.9 with Figure 1.10).

Figure 1.10. HTML comments appear in the source code but not in the Web page itself.

<!-- Comment goes here. -->

PHP supports three comment types. The first is similar to comments in shell scripts (a Unix thing) and uses the pound or number symbol (#).

# This is a comment.

The second stems from the C++ programming ...

Get PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.