
PHP AND MYSQL WEB DEVELOPMENT
vi
Accessing Form Variables ....................................................................19
Form Variables ................................................................................19
String Concatenation ......................................................................20
Variables and Literals ......................................................................21
Identifiers ..............................................................................................21
User-Declared Variables ......................................................................22
Assigning Values to Variables ..............................................................22
Variable Types ......................................................................................22
PHP’s Data Types ............................................................................22
Type Strength ..................................................................................23
Type Casting ....................................................................................23
Variable Variables ............................................................................23
Constants ..............................................................................................24
Variable Scope ......................................................................................25
Operators ..............................................................................................25
Arithmetic Operators ......................................................................26
String Operators ..............................................................................27
Assignment Operators ....................................................................27
Comparison Operators ....................................................................29
Logical Operators ............................................................................30
Bitwise Operators ............................................................................31
Other Operators ..............................................................................32
Using Operators: Working Out the Form Totals ..................................33
Precedence and Associativity: Evaluating Expressions ........................34
Variable Functions ................................................................................36
Testing and Setting Variable Types ................................................36
Testing Variable Status ....................................................................37
Reinterpreting Variables ..................................................................37
Control Structures ................................................................................38
Making Decisions with Conditionals ..................................................38
if Statements ....................................................................................38
Code Blocks ....................................................................................38
A Side Note: Indenting Your Code ................................................39
else Statements ................................................................................39
elseif Statements ..............................................................................40
switch Statements ............................................................................41
Comparing the Different Conditionals ............................................42
Iteration: Repeating Actions ................................................................43
while Loops ....................................................................................44
for Loops ........................................................................................45
do..while Loops ..............................................................................46
00 7842 FM 3/6/01 3:38 PM Page vi
Kommentare zu diesen Handbüchern