- strtolower: documentation ( source)
<?php
$listing = new stdClass;
$listing->name = 'Test Location';
$results = [
0 => [
'address' => '123 Testing',
'name' => 'Test Location'
]
];
foreach($results as $key => $result)
{
if( strtolower($listing->name) == strtolower($result['name']) )
{
echo 'key: '. $key;
}
}