Issues with array_search
<p>When I run the following, I get <code>'B.C.'</code>, but I'm trying to get <code>'BC'</code>.</p>

<p>I set <code>array_search</code> to do a strict comparison, why isn't it returning <code>"BC"</code>?</p>

<p>If I pass <code>"Alberta"</code>, I get <code>"AB"</code>, which is correct.</p>

<pre><code>&lt;?
function cleanProvince($province)
{
    $values = array(
        'AB' =&gt; 'Alberta',
        'BC' =&gt; 'B.C.',
        'BC' =&gt; 'British Columbia',
        'ON' =&gt; 'Ontario',
        'ON' =&gt; 'Onatrio',
        'ON' =&gt; 'Ont',
        'NS' =&gt; 'Nova Scotia',
        'QC' =&gt; 'Quebec'
    );
    if ($key = array_search(@$province, $values, true)) {
        return $key;
    } else {
        return $province;
    }
}
echo (cleanProvince("B.C."));
?&gt;
</code></pre>
