Posted by Man-wai Chang on 04/25/07 08:58
Given this assoc array:
$dtl_array[0]['uom_array'][0][0]='key1';
$dtl_array[0]['uom_array'][0][1]='value1';
$dtl_array[0]['uom_array'][1][0]='key2';
$dtl_array[0]['uom_array'][1][1]='value2';
$dtl_array[1]['uom_array'][0][0]='key3';
$dtl_array[1]['uom_array'][0][1]='value3';
$dtl_array[1]['uom_array'][1][0]='key4';
$dtl_array[1]['uom_array'][1][1]='value4';
$sample->assign("dtl_array",$dtl_array);
$sample->display();
How could I create a combobox out of $dtl_array in the templates?
The following does not work:
<select name="aname">
{section name=mm start=0 loop=$dtl_array.0.uom_array step=1}
<option value="{$dtl_array.0.uom_array.mm.0}">
{$dtl_array.0.uom_array.mm.1}
{/section}
</select>
--
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]
|