I am using SMARTY and I need to create an array and assign a value to its specific index.
Sort of:
{foreach from=$a key='i' item='b'}
ARRAY[$i] = $VALUE;
{/foreach}
Now the problem is that I'm using the standard Smarty Assign syntax
{assign var='array.$i' value=$VALUE}
{assign var='array[$i]' value=$VALUE}
{assign var=$array.$i value=$VALUE}
{assign var='$array[$i]' value=$VALUE}
does not work. I need to use this array later in the code, and therefore, I need it only in array format
source
share