That One Kid's Lament

He will be lonely until he has 10 friends...

Oh, I am so lonely. I have 0 friends.

Oh, I am so lonely. I have 1 friends.

Oh, I am so lonely. I have 2 friends.

Oh, I am so lonely. I have 3 friends.

Oh, I am so lonely. I have 4 friends.

Oh, I am so lonely. I have 5 friends.

Oh, I am so lonely. I have 6 friends.

Oh, I am so lonely. I have 7 friends.

Oh, I am so lonely. I have 8 friends.

Oh, I am so lonely. I have 9 friends.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Assignment041</title>
</head>

<body>
<h1>That One Kid's Lament</h1>
<p>He will be lonely until he has 10 friends...</p>

<?php
//set friendcount variable
$friendcount=0;

//start while loop with condition
while ($friendcount 10)
{
    
//Time to be sad.
    
echo "Oh, I am so lonely.  ";
    echo 
"I have ".$friendcount." friends.<br><br>";
    
    
//add a friend!
    
$friendcount=$friendcount+1;
}

print 
show_source("Assignment041.php");
?>
</body>
</html>
1