0

I would like to get the key of an array but the function key () is not enough. I have a table of the type:

array(
 0 => array(
   'id'=>'2',
   'name'=>'fe'
 ),
1 => array(
   'id'=>'3',
   'name'=>'fz'
 ),
)

I would like to retrieve the name according to the id. For example, know that table id 1 is named 'fe'. I do not know how to do that, I thought to get the index (in my example 0 then do an array [index] ["name"] but I can not do it Can you give me some leads please? Thank you

Cohchi
  • 543
  • 3
  • 9
  • 19

0 Answers0