I can't figure it out!
Output:
"; } while ($result < 10); ?>
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Post Condition Loop</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> </head> <body> <p> <?php $result = 1; /* Use a post-condition loop to increment the result and continue incrementing the result while it has a value less than 10 */ do { print $result++ . "<br>"; } while ($result < 10); ?> </p> </body> </html>
Weird, the output I get is:
1 2 3 4 5 6 7 8 9
Did you configure the web server so that PHP can be used?
Strange, I'm on hostgator.com so PHP comes pre-installed and pre-configured. Some other basic scripts have worked without a hitch..
Oooh.
My bad, I used .html rather than .php
Problem solved, thanks!