I'm facing an issue since yesterday. I wanted to test the fact that, within a FOR loop, i'm able to dynamically create variables for each link.
A quick example:
%%[ For @u = 1 to 10 do Set @row = Row(@myArticlesArray, @u); Set @myIndexArticle = Field(@row,1); TreatAsContent(Concat("%","%[Set @articleLink",@u," = Replace(Replace(Field(Row(@links,@myIndexArticle),'Value'),'%2F','/'),'%3A',':')]%", "%")) ]%% <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"> <tr> <td><a href="%%=RedirectTo(??)=%%"">My Article Title</a></td> </tr> </table> %%[ Next @u ]%%
In that particular case, I check for urls in an xml feed, decode it to replace the special characters (and have a proper ://, instead of a %3A%2F%2F).
This first step works perfectly. I end up with 10 variables named @articleLink1, @articleLink2.... @articleLink10.
But what do I have to put on the "href" parameter to refer to it? I tried many things, with Concat, TreatAsContent and more, but nothing seems to work.
Thank you in advance!
P.S The loop until 10 is an exemple, I can have more or less articles.