Re: getting array index inside for loop

2004-04-14 Thread Andrew Gaffney
JupiterHost.Net wrote: Andrew Gaffney wrote: Charles K. Clarkson wrote: Andrew Gaffney <[EMAIL PROTECTED]> wrote: : : I have code that uses a 'foreach(@array) {}' to loop : through an array. I now need to be able to get the : array index inside of that. I know I could switch to : a 'for($loopva

Re: getting array index inside for loop

2004-04-14 Thread JupiterHost.Net
Andrew Gaffney wrote: Charles K. Clarkson wrote: Andrew Gaffney <[EMAIL PROTECTED]> wrote: : : I have code that uses a 'foreach(@array) {}' to loop : through an array. I now need to be able to get the : array index inside of that. I know I could switch to : a 'for($loopvar=0;$loopvar<@array;$lo

Re: getting array index inside for loop

2004-04-14 Thread Andrew Gaffney
Charles K. Clarkson wrote: Andrew Gaffney <[EMAIL PROTECTED]> wrote: : : I have code that uses a 'foreach(@array) {}' to loop : through an array. I now need to be able to get the : array index inside of that. I know I could switch to : a 'for($loopvar=0;$loopvar<@array;$loopvar++) {}' to : do that

Re: getting array index inside for loop

2004-04-14 Thread JupiterHost.Net
I have code that uses a 'foreach(@array) {}' to loop through an array. I now need to be able to get the array index inside of that. I know I could switch to a 'for($loopvar=0;$loopvar<@array;$loopvar++) {}' to do that, but I'd have to change some other code also. If not that way, is there a way

RE: getting array index inside for loop

2004-04-13 Thread Charles K. Clarkson
Andrew Gaffney <[EMAIL PROTECTED]> wrote: : : I have code that uses a 'foreach(@array) {}' to loop : through an array. I now need to be able to get the : array index inside of that. I know I could switch to : a 'for($loopvar=0;$loopvar<@array;$loopvar++) {}' to : do that, but I'd have to change so