Search in a multidimensional array and get the key?

ساخت وبلاگ
Hello everyone, I was wondering if someone could explain to me how I could search in a multidimensional array and get the key?

Here is the example array:
Code:

$data = array(
  0 => array(
    'name' => 'name one',
    'lastname' => 'last name one',
    info => array(
      'tag' => 'some tag',
      'itemId' => 'item id one'
    )

    ),
    1 => array(
      'name' => 'name two',
      'lastname' => 'last name two',
      info => array(
        'tag' => 'some tag',
        'itemId' => 'item id two'
      )
 
    )
      );

I want to search for "item id two" and get the array key of 1, or if I searched for "item id one" then I get the key 0.
Sorry for my bad English, I hope someone will help me.
CodingForums...
ما را در سایت CodingForums دنبال می کنید

برچسب : نویسنده : codingforums بازدید : 255 تاريخ : چهارشنبه 11 ارديبهشت 1398 ساعت: 22:22