I am trying to get a loop for following...
{$product.min_val} //2
{$product.max_val} //8
and i am trying following...
{section name=val start=$product.min_val loop=$product.max_val step=0}
<p id="{$smarty.section.val.index}">{$smarty.section.val.index}</p>
{/section}
it prints following...
<p id="2">2</p>
<p id="3">3</p>
<p id="4">4</p>
<p id="5">5</p>
<p id="6">6</p>
<p id="7">7</p>
You might have noticed that its missing <p id="8">8</p>
according to {$product.max_val}
thanks.
Loop is the number of times the section will loop, so you need:
{section name=val start=$product.min_val loop=$product.max_val+1}
<p id="{$smarty.section.val.index}">{$smarty.section.val.index}</p>
{/section}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With