Hey guys,
I am trying to make the following loop work. Basically, I am trying to display the children as options. Why doesn't it work? The optiongroups are being displayed. And the arrays are constructed the right way.
{foreach from=$tpl_parents item='row' key='i'}
<optgroup label="{$row.NAME}">
{foreach from=$tpl_children.$i item='child' key='y'}
<option value="{$y}">{$child.VALUE}</option>
{/foreach}
</optgroup>
{/foreach}
The array I am trying to loop through is constructed this way: Parent array:
array(328) {
[0]=>
array(42) {
["ID"]=>
string(4) "123"
["NAME"]=>
string(6) "blabla"
...
...
Child array:
array(192) {
[123]=>
array(2) {
[881]=>
array(11) {
["CHILD_ID"]=> string(5) "881"
["PARENT_ID"]=> string(4) "123"
["VALUE"]=> string(2) "No"
...
...