Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. %%[
  2. var @arr, @e, @arrPos, @count, @lastVal
  3.  
  4. set @arr = "red|yellow|black|white|green"
  5. set @e = BuildRowsetFromString(@arr,"|")
  6. set @count = rowcount(@e)
  7.  
  8. if @count > 0 then
  9.  
  10. set @arrPos = row(@e, @count) /* get row last element */
  11. set @lastVal = field(@arrPos,1)
  12. outputline(concat("<br>lastVal: ",@lastVal))
  13.  
  14. else
  15.  
  16. outputline(concat("<br>empty array"))
  17.  
  18. endif
  19. ]%%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement