How to append to a variable array ?
hello,
Assuming I have a variable $A=array(1,2,3)
and In a loop I need to append $article.node_id to this array ?
how would i do that ?
The only possible way is that i have to retype the array and append after it? and it didn't wok any where else
please contact
thanks
Comments (1 historical)
Written by readers of the earlier documentation sites, kept as they were.
Re: How to append to a variable array ?
Adrien ·
Let the array retype itself... In your loop, do something like
{set $A = $A|append($article.node_id)}