I have an array,
array
(
[0] => array
(
[id] => 2
[title] => Test
[alt_text] => 'This is test',
)
[1] => array
(
[id] => 3
[title] => Test1
[alt_text] => 'This is test1',
)
[2] => array
(
[id] => 7
[title] => Test2
[alt_text] => "This is test2",
),
)
I want the value of the title for dynamic id.
E.g. If I pass 2, then it should return value of title as Test
I can do this with foreach loop no issue. But is there any core function to achieve this or a combination of core functions or a one-liner snippet?