its working
but still my problem has not solved
this  5 is static for this loop  #foreach ($i in [0..5]) 
but in my code i am getting the value of 5 in some variable say
$!count = 5 
and i tried to run the loop now as
#foreach($i in $!count )
..some statements
#end
but it is not working 

Thanks
T




----- Original Message ----- 
From: "Sayed Hashimi" <[EMAIL PROTECTED]>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Wednesday, March 23, 2005 8:12 PM
Subject: RE: How to run for loop


#foreach ($i in [0..5])

try that.

--
Sayed Ibrahim Hashimi
www.cise.ufl.edu/~sih

-----Original Message-----
From: tarun Narang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 23, 2005 9:42 AM
To: Velocity Users List
Subject: Re: How to run for loop


Thanks 

but my problem is that i dont want to use the object or ArrayList 

i want to run the loop like in java as for(int i=0 ;i<=5; i++) 

in velocity page

Is it possible to run the code like below

#set ($countRow =5)

#foreach($i in $!countRow) .......some statements  

#end 

----- Original Message ----- 
From: "Dimitrios Kolovos" <[EMAIL PROTECTED]>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Wednesday, March 23, 2005 7:54 PM
Subject: Re: How to run for loop


> #foreach ($i in [0..10])
>     ##Do your stuff here
> #end
> 
> Please consider the RTFM principle.
> 
> Cheers,
> Dimitrios
> 
> ----- Original Message ----- 
> From: "tarun Narang" <[EMAIL PROTECTED]>
> To: "Velocity Users List" <velocity-user@jakarta.apache.org>
> Sent: Wednesday, March 23, 2005 2:06 PM
> Subject: How to run for loop
> 
> 
> > hi 
> > 
> > I want to run a for loop for a number of times in velocity page 
> > how can i
> > 
> > Thanks
> > T
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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]
> 
> 

---------------------------------------------------------------------
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]

Reply via email to