Hello, I'm having a problem calling a loop using smarty from php. Here's the code I'm working on:
for($k=1;$k<=$score;$k++){
echo '<div class="enab" id="'.$k.'"> </div>';
}
for($i=$rem;$i>=1;$i--){
echo '<div class="dis" id="'.$k.'"> </div>';
}
$k++;
$smarty->assign('score',?);
$smarty->assign('score2',?);
I need to make them both loop in smarty, one on top of the other.
so they will make a list like so:
<div class="enab" id="1"> </div>
<div class="enab" id="2"> </div>
<div class="enab" id="3"> </div>
<div class="dis" id="4"> </div>
<div class="dis" id="5"> </div>
using something like (in template tpl):
{section name=score loop=$score}
{$score[score]}
<br />
{/section}
I cannot seem to get it to loop the php 'for' query. Can Anyone shed any light on this?
Thank You.