He will be lonely until he has 10 friends...
Oh, I am so lonely. I have 0 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