Loop?
| From: | Tom Sommer | Date: | Sat, 01 Mar 2003 19:52:52 +0000 |
| Subject: | Loop? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8323@lists.php.net to get a copy of this message | ||
I have a var called $skill that has the value 4
I need to loop from 1 to 5 and if the count is <= $skill I need to print
something
so bassically I need to do this
<?php
for($i = 1; $i <= 5; $i++)
{
if ($i <= $skill)
echo "this";
else
echo "that";
}
?>
in smarty?
I need to do this like section for foreach, but can't really get it to
work.. anyone?
--
Tom Sommer, denmark
www.tsn.dk - www.dreamcoder.dk