| Posted by Man-wai Chang on 04/23/07 09:54 
> 1. How could concatenate two values into a string in the template?>
 > {section name=j start=0 loop=10 step=1}
 >   {section name=k start=0 loop=10 step=1}
 >      {assign var=xx value=concat($smarty.section.j,$smarty.section.k)}
 
 I gave up and use PHP codes to do it.
 
 <?php $combined="COL{$part1}ROW{$part2}"; ?>
 <input type="textbox" id="txtQty<?php echo $combined; ?>">
 
 >      {xx}
 >   {/seection}
 > {/section}
 
 > 2. How could I address/use associative array in the template? I could do
 > it with numbers, but it will be more self-documentating if I could use
 > assoc. array....
 >
 
 It's {$array[i][j].attribute}. But what if the index is not in the end?
 Will {$array[i].attribute.[j]} work?
 
 --
 iTech Consulting Services Limited
 Expert of ePOS solutions
 Website: http://www.itech.com.hk (IE only)
 Tel: (852)2325 3883	Fax: (852)2325 8288
  Navigation: [Reply to this message] |