index.tpl
  <table>
  {section name=mysec loop=$name}
  {strip}
     <tr bgcolor="{cycle values="#eeeee,#dddddd"}">
        <td>{$name[mysec]}</td>

     </tr>
  {/strip}
  {/section}
  </table>

  <table>
  {foreach item=user from=$users}
  {strip}
     <tr bgcolor="{cycle values="#aaaaaa,#bbbbbb"}">

        <td>{$user.name|capitalize}</td>
        <td>{$user.phone}</td>
     </tr>
  {/strip}
  {/foreach}

  </table>
  
This template illustrates two ways to loop through arrays assigned to templates. Note the alternating row colors via the cycle function, the capitalize variable modifier, and the use of strip function to strip out newlines and white space.