This question already has an answer here:
I need to get "bar" from this:
array(1) { [1]=> array(2) { ["id"]=> string(4) "8097" ["content"]=> string(3) "bar" } }
Is there any way to do it? (the code is from var_dump).
</div>
try array_search('what you want to search','Where you want to search')
Since I don't know why you want "bar" specifically (i.e., is it just the 'content'
of the element with index [1]
?) I'll suggest simply:
echo $your_array[1]['content'];