Return to Snippet

Revision: 1449
at October 9, 2006 11:15 by sorehead


Updated Code
<?php
/* Loop in PHP Using For (Descending)
For those times you need to do a loop in PHP, but have the outcome be in descending order (ie, start at 10 and end at 1). */

$totalcode="10";
for($i=$totalcode; $i>0; $i--){

 echo"$i";
}
?>

Revision: 1448
at October 9, 2006 11:13 by sorehead


Initial Code
Loop in PHP Using For (Descending)

Initial URL
http://www.bigbold.com/snippets/posts/show/2219

Initial Description


Initial Title
Loop in PHP Using For (Descending)

Initial Tags
php

Initial Language
PHP