Jump to content

How to get Array Key (When its a name)


JREAM

Recommended Posts

You could use foreach

foreach( $arrForms ad $k => $val )
{
   // $k = array key...
}

 

or you could use array_keys

 


$keys = array_keys($arrForms);

reset($keys);

while ($key = current($keys))
{

   // $key = array key...

next($key);

}

 

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.