PHP Index


Loop
<!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>
<title>forloops</title>
<style type="text/css">
table
{
margin:auto;
}
th
{
background-color:#FF9900;
border:1px solid black;
}
td
{
text-align:center;
border:1px solid black;
}
</style>
</head>
<body>

<table>
<tr><th>The following rows were created with a loop!</th></tr>
<?php

for($counter=$counter <100$counter=$counter+1)

echo 
"<tr><td>";
echo 
"This is loop number ".$counter
echo 
"</td></tr>";

}
?>

</table>

</body>
</html>