RE: howto: array index inside a foreach loop

2002-11-22 Thread Ken Lehman
ECTED]] Sent: Friday, November 22, 2002 4:12 PM To: [EMAIL PROTECTED] Subject: Re: howto: array index inside a foreach loop Ken Lehman wrote: > Say I have a foreach loop that I used to modify elements when they match a > pattern that I am searching for, but there is one special case where I ge

Re: howto: array index inside a foreach loop

2002-11-22 Thread david
Ken Lehman wrote: > Say I have a foreach loop that I used to modify elements when they match a > pattern that I am searching for, but there is one special case where I get > a match and I need the index for that element. Can I get that index or do > I have to go with a for() loop. If this can be d

Re: howto: array index inside a foreach loop

2002-11-22 Thread Tanton Gibbs
You need to use a for loop for this. - Original Message - From: "Ken Lehman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 22, 2002 3:42 PM Subject: howto: array index inside a foreach loop > Say I have a foreach loop that I used to modify elements when they match a >