I just want to know how to access an array in SMARTY that have generated index via smarty. I want to access it later.
Got something like this:
{if $smarty.get.{param_{$k.id}_{$p.num}} eq $key}
and I like to access $smarty.get.(dynamic generated index)
Tried a couple variations, but didn't have any luck.
You can use variable for indexes, but you cannot build string the way you tried. Try to build a custom variable before:
This should work.
This will work also
In my case I used UnLoCo solution and tried to directly access array content (without if statement) with dynamic key and it works perfectly :