I'm using smarty and am trying to process a nested array. I can't seem to get it right. Here's the array:
Array
(
[0] => Array
(
[name] => Chef Brian
[id] => 8
[recipe] => Array
(
[0] => Array
(
[category] => Poultry
[recipeid] => 1
)
[1] => Array
(
[category] => Beef
[recipeid] => 25
)
)
)
)
I'm trying to print out:
Chef Brian , (1) Poultry (25) Beef
But can't seem to get the values I want printed... I tried:
{foreach from=$chefs item="value"}
{$value.name}
<ul>
{foreach from=$value.recipe key=key2 item="value2"}
{foreach from=$value2 key=key3 item=value3}
<li>{$value2.recipeid} - {$value2.category}</li>
{/foreach}
{/foreach}
</ul>
{/foreach}
But, it's not what I was expecting.