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... 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 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
Archived
This topic is now archived and is closed to further replies.