yes... Having the latest tools jar, just put:
<tool> <key>list</key> <scope>application</scope> <class>org.apache.velocity.tools.generic.ListTool</class> </tool> into your toobox.xml If the array you have put into your context is say $myArray, the you can do: $list($myArray, $indexNum) On the other hand, if you make your array into a Vector and put that into the context, the you can do: $myvector.elementAt($indexNum) Bill On 3/1/06, Nathan Bubna <[EMAIL PROTECTED]> wrote: > > get the latest velocity tools jar and put an instance of ListTool in > the context: > > > http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/generic/ListTool.html > > On 3/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > what would be the best way to read the item of an array one by one; > > not like; > > #foreach( $item in $result ) > > $item > > #end > > > > i want to read it like, array[2], reading the item two of an array? > through the velocity, > > i have try the $array.get($result,2), and it not working, its there is a > another way? > > > > -- > > This message was sent on behalf of [EMAIL PROTECTED] at > openSubscriber.com > > > http://www.opensubscriber.com/messages/velocity-user@jakarta.apache.org/topic.html > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >