August 2003
Intermediate to advanced
1104 pages
19h 27m
English
Every PHP script is a collection of one or more statements. Each statement instructs PHP to perform a subtask, which is part of the greater algorithm. The statement appears as a collection of names, numbers, and special symbols. At the end is either a semicolon or a block of statements inside curly braces. For clarity, you may add any number of line breaks and spaces within the statement. Any block of PHP code that does work and ends in a semicolon is a statement. Listing 2.1 shows several simple statements.
<?php
//an expression statement
2 + 3;
//another expression statement
print("PHP!");
//a control statement
if(3 > 2)
{
//an assignment statement
$a = 3;
}
?>
|
The first statement is the ...