Array
(
[0] => Array
(
[name] => willt
[username] => willt
)
[1] => Array
(
[name] => Adam
[username] => adamb
)
)
I have an array and am assigning it to smarty via $smarty->assign('array', $array);, but I can’t get it in the template. How to correctly refer to it? I tried:
array[1].name
array.1.name
with and without $.
Is it visible in the template? If it is,
{$array.1.name}should do it.You could also check the documentation.