<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Stars of Stars</title>
<!--
<script type="text/javascript" src="myjavascript.js"></script>
<link href="mystyle.css" rel="stylesheet" type="text/css">
-->
<style type="text/css"><!--
   /* internal styles */
--></style>
</head>
<body>
 
<h1>Stars of Stars</h1>

<p style="border: 1px solid gray; margin: 2em; width: 15em; padding: 2em; background: #ffe ;">
<?php
   
// Stars of Stars program, in PHP
   // Author: Burt Rosenberg
   // Date: May 2007

   
$i 20 ;
   while ( 
$i>) {
      if ( 
$i%2==) echo '<span style="color: red;">' ;
      else echo 
'<span style="color: blue;">' ;
      
lineOfStars$i ) ;
      echo 
"</span><br>\n" ;
      
$i-- ; 
   }

   
// declare a function, function names are known throughout
   
function lineofStars$howManyStars ) {
      
// $howManyStars is passed by value
      
while ( $howManyStars>) {
         echo 
"*" ;
         
$howManyStars-- ;
      }
   }

?>
</p>
</body>
</html>