خرید بک لینک
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.

برچسب: نویسنده: آیلین رضوانی تاريخ: چهارشنبه 11 ارديبهشت 1398 ساعت: 22:22

صفحه بندی