Use for loop to output html tags in PHP
Description
The following code shows how to use for loop to output html tags.
Example
<html>/* w w w . ja va2 s . c o m*/
<body>
<?php
for($count = 1; $count <= 3; $count++)
{
print("<b>$count</b> I'm good enough, ");
print("I'm smart enough, ");
print("and, doggone it, people like me!<br>\n");
}
?>
</h1>
</body>
</html>
The code above generates the following result.