This is something to do when you're really bored.
Challenge (easy):
Code:
<?php
$x = 0;
while ($x < 10) {
echo "<p>$x</p>";
$x++;
}
?>
1. Edit the above script so that it echos out the numbers 1 - 100
2. Edit the above script so that it echos out all the even numbers 1 - 100
3. Edit the above script so that it echo out all the numbers 100 - 1
If I find, or think of any more challenges I'll post them here.
(Challenge found on
Wikiversity)