Chapter 1 Introduction to PHP Part 1
Textbook’s Code DOWNLOADS PHP and MySQL for Dynamic Web Sites Complete Set of Scripts and Commands
first.php Script 1.2 on page 3 irst.php irst.php ch01\first.php
second.php Script 1.3 on page 7 econd.php econd.php ch01\second.php
echo echo ‘Hello, world!’; echo “What’s new?”; print ‘Hello, world!’; print “What’s new?”; echo “She said \”How are you?\””;
comments.php Script 1.4 on page 11 omments.php omments.php ch01\comments.php
predefined.php Script 1.5 on page 15 predefined.php predefined.php ch01\predefined.php
variables Starts with a $ – $amount
Variable types Boolean (TRUE or FALSE) Integer Floating point String Resource (used with databases) NULL (has no value)
Assignment #2 Do $_SERVER[‘SERVER_NAME’] erver.php erver.php