Solution 3
Main | Static vs. Dynamic Websites | Using PHP | A Simple PHP Program | Variables and Operators | Practice 1 | Solution 1 | Loops | Practice 2 | Solution 2 | Functions | Practice 3 | Solution 3 | Conditionals | Practice 4 | Solution 4 The solution to practice 3 is: <html> <? function spacer($j) { for ($i=0; $i < $j; $i++) { echo "<br>"; } } ?> I like <? spacer(5); ?> to space <? spacer(7); ?> things <? spacer(6); ?> out </html>
jfulton [at] member.fsf.org
|