In order to become familiar with PHP programming structures and commands, we will build various PHP pages. Sections of this page will explain each PHP command, provide a link to a working sample, and detail the working sample's PHP code. Let's get started:
| Comments |
|---|
Up to this point we have rarely commented our HTML. Well, it is now time to start commenting your PHP. We comment in order to speed up maintenance of our code. After not working with a bit of code for a long time, you will have a hard time recognizing what the code means, so COMMENT your code! =). PHP allows you to comment your code using three methods: # This is a single line comment. // This is also a single line comment. /* This is a |
The sum of the numbers is ".$total."
");In JavaScript, we used // to create single line comments and /* */ for multiline comments.