October 2002
Intermediate to advanced
368 pages
7h 12m
English
You can also easily intertwine small segments of PHP into HTML, such as when printing out the value of a variable:
<h1>Today's Date is <?= $date ?>.</h1>
The “<?=” syntax in the php, when followed by a variable, is used as shorthand for the echo() function.
You can include comments in your PHP scripts. Comments are ignored by the Web server, and any comments contained within the PHP code are not sent to a browser. There are three forms of comments:
#— Used just like it is used in PERL; comments out the remainder of the line after the # symbol.
//— Used just like it is in JavaScript; comments out the remainder of the line after the // symbols.
/* and */— Comments out anything in between the two sets of symbols. This is the same syntax ...
Read now
Unlock full access