I have created a multidimensional array which looks like this:
Array
(
[0] => Array
(
[id] => 4
[questions] => Array
(
[title] => This is an example
)
)
Now I would like to check if there is a value in this array for key "title". I tried it this way but it still returns false:
$key = array_search($value, array_column($array, 'title'));
// value has the value of the title and $array is the multidimensional array
if ($key !== FALSE){
echo "Found";
}
else {
echo "Not found";
}