Let's say I have an array that looks like this:
$array[0] = 'House';
$array[1] = 'Condo';
$array[2] = 'Townhouse';
$array[3] = 'Land';
If I passed a var which contains either "condo" or "Condo" (in other words, case-insensitive), I want to return 1, indicating that $array[1] matches "condo" or "Condo" or "CONDO".
So basically I want:
$search = 'Condo';
$key = get_property_key($search, $array);
// $key should return 1
Is there a quick PHP method to do this? Or do I need to write my own function to loop through? If it's the latter, you don't need to write out the function for me - I can handle it myself. But I'm hoping there's a PHP function that I missed during my "education" period (although this education period NEVER ends).