You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Assia Aouat <as...@canada.sirsi.com> on 2004/09/10 21:56:04 UTC

RE: beginner question2

May be

#set ($var = "")
#set ($list = ["1","2","3","4"])
#foreach($l in $list)
#set ($var= $var +" "+$l)
#end
$var

Hope that will help


-----Original Message-----
From: Mikael Larsson [mailto:mikael.x.larsson@tele2.se] 
Sent: Friday, September 10, 2004 3:56 PM
To: velocity-user@jakarta.apache.org
Subject: beginner question2
Importance: Low

Hi

How to avoid this output
#set ($list = ["1","2","3","4"])
#foreach($l in $list)
$l
#end

prints
1
2
3
4

I want this
1234

//Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org