Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

Whitespace, that is spaces, tabs, and carriage returns, is ignored by PHP. Used
judiciously, it can enhance the readability of your code. Listing 1.2 is functionally the
same as the previous example, though you may notice more easily that it contains PHP
code.


Listing 1.2 Reformatting for Readability




Listing 1-2


Today's Date:
/*
** print today's date
*/
print(Date("l F d, Y"));
?>


You may also notice that in Listing 1.2 there is a line of code that begins with a slash
followed by an asterisk. This is a comment. Everything between the / and the / is

Free download pdf