Web Design

(Nancy Kaufman) #1

281


CHAPTER

Creating Dynamic Pages 12


Why does the line with echo end in a semicolon?
Every PHP statement needs to end in a semicolon,
which is essentially your way of letting PHP know
that that statement is complete. If you do not end
the statement with a semicolon, you get an error
when you try to run your page.

Some pages use <? only for the opening
delimiter instead of <?php. Is one more correct
than the other?
PHP supports the shorter form of the opening
delimiter, but not by default, so you need to modify
the configuration file in order to use it. Most PHP
developers prefer the longer form.

6 Type the closing PHP
delimiter, ?>.


The PHP is entered onto
the page.


4 Type echo “Hello,
world”;.


5 Press.


6


4


TIPS

Free download pdf