✓ Your Web site: The site where your published Web site is sprintf can do more than format decimal places. If you want
located. The location where the public views your Web site. commas to separate thousands in your number, you can use
number_format.
✓ Your development site: The location where you develop
your Web pages. When your pages are complete, you then You need to tell PHP to interpret the single quote (’) as an
move them to your Web site. apostrophe instead of as the end of the string. You can do
this by using a backslash (\) in front of the single quote. The
IP address- The unique address used by computers to locate backslash tells PHP that the single quote does not have any
a Web site special meaning; it’s just an apostrophe. This is escaping the
Php Statements character
A block is enclosed by curly braces, { and }. The statements in Single-quoted and double-quoted strings are handled
a block execute together - complex statements differently. Single-quoted strings are stored literally, with the
exception of \’, which is stored as an apostrophe. In double-
PHP doesn’t care whether the statement keywords are in quoted strings, variables and some special characters are
uppercase or lowercase evaluated before the string is stored.
Variables are containers used to hold information. A variable The quotes that enclose the entire string determine the
has a name, and information is stored in the variable. treatment of variables and special characters, even if other
sets of quotes are inside the string.
All variable names have a dollar sign ($) in front of
them. This tells PHP that it is a variable name. You can join strings, a process called concatenation, by using
a dot (.).
Variable names can be any length.
define(“AGE”,29);
To put numbers into the proper format for dollars, you can
use sprintf.