This is an old revision of the document!
This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.
As an aid, feel free to use the following questions to help you generate content for your entries:
1. For loops and While loops are condition-based and top-driven loops.
Top-driven loops can loop 0 or more times.
2. Do-while loops are condition-based and bottom-driven loops.
Bottom-driven loops can loop 1 or more times.
3. ARRAYS!
scalar variable - single composite variable - container Ex. $nums[0] $nums[2] = 26;
4. FOREACH loops!
Ex. foreach($nums as $i) For each number in $nums, pull one out, and do this stuff: statement; statement;
1. Loop – repeat/repetition – iteration
Numeric for() loop List-based for() loop While() loop Do while() loop Top and bottom driven loops...condition-based. Syntax for a for() loop: for(start condition; loop condition; progression) { statement; } for($i = 0; $i < 10; $i++) { statement; }
interpreted execution = live…line by line compiled execution = if there are syntax errors, it will not run
BORDER COLORS!
style=\"border: 2px solid black dashed green dotted #ff00ff
1. IF statements. You must have at the least/most 1 IF, but you can have 0 or more ELSEIF's.
if(condition) {
statement;
} elseif {
statement;
} else {
statement;
}
Relational Operators!
2. Must use echo when using HTML code in PHP.
Ex.
echo "<div style=\"color: rgb($size, $size, $size);\">"; echo "<p>Some text to see what happens."; echo "</div>";
3. PHP is mind-boggling. I love it.