Solution 2

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 2 is:

<html>
I like
<? for ($i=0; $i < 5; $i++) {
        echo "<br>";
} 
?>
to space
<? 
$i=0;
while ($i < 7) { 
        echo "<br>";
	$i++; 
} 
?>
things
<? for ($i=0; $i < 6; $i++) {
        echo "<br>";
} 
?>
out   
</html>


jfulton [at] member.fsf.org
22 Aug 2013