Jump to content

[SOLVED] How to extract an array index number?


DamienRoche

Recommended Posts

I have this array - $arr[]

 

Say I do this:

 


foreach($arr as $arrtest){

echo "$arrtest index number:()";

}

 

How would I go about getting the index number of $arr? I can just apply a loop because the arr isn't always in the same order.

 

Any ideas?- thanks.

Thanks Orio, I use the manual every day. This seems to be an array thing, the only relation to the foreach is that it has the support for this array technique. I just tested outside a foreach.

 

Thanks for reaffirming the importance any way.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.