Is there a way that I can make a reference to the number of the array member(if foreach loop is on $array[1] - the number 1 is what I'm looking for) that I am at in a foreach loop? For instance how can I say:
foreach (@array)
{
if (NUMBER_OF_ARRAY_MEMBER_I'M_ON_NOW>2)
{
do some stuff;
}
}
Yeah, I know it's an ugly example
, but I don't know any terminology that would enable me to word it more clearly. And yes, I also realize I could use a regular for loop to do such a thing quite easily, but I am just curious....
Thanks,
jrtayloriv