Hello,
Im trying to create a loop to display a set of asterisks to create a set of "stairs."
example:
*
**
***
****
*****
******
*******
Im not very good at html and everything Ive tried has failed.
Does anyone have any suggestions or samples?
Thanks a lot, i REALLY appreciate any help at all!
You're probably looking for the http://htmlhelp.com/reference/html40/block/pre.html element......what have you tried that has failed?
Looks like I misread the question quite a bit. Problem is, that's not an HTML question but a Javascript or CGI/PHP question, and should be in another section.
What you're looking for is something like this (the actual details will vary depending on the language you're using) :
for(a = 1; a<=5; a++)
{
for(b = 1; b<=a; b++)
print "*";
print "<br>";
}
Maybe something like this in php:
<html>
<?
for($i = 0; $i < 100; $i++) {
echo "this message has echoed $i times <br>";
}
?>
</html>
or
for($i = 0; $i < 100; $i++) {
some php code
}
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)