I have an array that looks something like this:
Array
(
[100] => Array
(
[room_id] => 100
[name] => Town Center
Easy use the PHP
function array_key_exists
You may have to go through a foreach
loop since you are using a multidimensional array:
$names = [];
foreach($array as $e)
{
if(array_key_exists('pin_id', $e)) {
echo "The 'pin_id' element is in the array";
$names[] = $e['name'];
}
}
And now $names
include all you names values