/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?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"; } ?>
URL: http://www.bigbold.com/snippets/posts/show/2219