|
home—lects—exams—hws
breeze (snow day)
From PHP Visual Quickstart Guide by Larry Ullman
Based on notes by Jack Davis (jcdavis@radford.edu)
if (condition) { statement… } else { statement… } |
if (condition) { statement… } elsif (condition) { statement… }… else { statement… } |
switch ($someLongExpr) { case 'value1': statement… break; case 'value2': statement… break; default: statement… break; } |
$v = $someLongExpr; if ($v == 'value1') { statement… } elsif ($v == 'value2') { statement… } else { statement… } |
while (condition) { statement… } do { statement… } while (condition); |
for ( initStmt; condition; endOfLoopUpdateStmt ) { statement… } |
If you need to use
can be called with an error message: e.g.
1
Ideally, I'd like a
language structure for handling each of a set of values:
like
home—lects—exams—hws
breeze (snow day)
©2011, Ian Barland, Radford University Last modified 2011.Apr.10 (Sun) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |