velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben <newread...@gmail.com>
Subject Re: String Array in Velocity
Date Sun, 09 Jan 2005 23:37:08 GMT
Thanks heaps.

Ben

On Sun, 9 Jan 2005 22:25:44 +0900, Shinobu Kawai
<shinobu.kawai@gmail.com> wrote:
> Hi Ben,
> 
> > I have a String Array, how can I retrieve its value if I know the index?
> >
> > Say I have this:
> >
> > String[] values = new String[] { "1", "2" }
> >
> > I have tried using this but it didn't work:
> >
> > $values[1]
> 
> Velocity currently does not support direct access to array elements.
> For now, you can use the ArrayTool.
>     http://wiki.apache.org/jakarta-velocity/ArrayTool
> 
> $array.get($values, 1)
> 
> Best regards,
> -- Shinobu
> 
> --
> Shinobu "Kawai" Yoshida <shinobu.kawai@gmail.com>
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message