I am using smarty as my template engine . I have a php result assigned to smarty $sac .
If I am writing
{foreach name = feach item = k from = $sac}
{$k->job_category}
{/foreach}
it shows the result in a line . But our designer used different divs to show the result .
<div class="left1">
<ol>
<li> Academic</li>
<li> Administrative</li>
<li> Bank</li>
<li> BPO</li>
<li> Civil</li>
<li> Defence</li>
</ol>
</div>
<div class="left1">
<ol>
<li> Engineering</li>
<li> Finance</li>
<li> Government</li>
<li> Hospitality</li>
<li> HR</li>
<li> Insurance</li>
</ol>
</div>
etc . Show I want to know how can I display results in this form . I think I can use modulus operator(%) since numer of fields are fixed in each column(6) .
you can use name iterator with forach. its based on loop foreach twice;
and for the next div block