ironmaiden666 Posted August 31, 2007 Share Posted August 31, 2007 <html> <head> <title> Counting Backwards </title> </head> <body> <h1>Counting Backwards</h1> <?php for ($i = 10; $i > 0; $i—){ print "$i <br>\n"; } // end for loop ?> </body> </html> there appear tens and it doesn't stop... Quote Link to comment https://forums.phpfreaks.com/topic/67491-solved-php-for-loop-doesnt-work/ Share on other sites More sharing options...
jeremywesselman Posted August 31, 2007 Share Posted August 31, 2007 Put another minus (-) sign next to the one that's already there. <?php for ($i = 10; $i > 0; $i--){ print "$i <br>\n"; } // end for loop ?> Jeremy Quote Link to comment https://forums.phpfreaks.com/topic/67491-solved-php-for-loop-doesnt-work/#findComment-338855 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.