Easy string switch and case function not working
<p>I can't figure out why this isn't working, and I know it's because of ssome simple stupid mistake.</p>

<p>Could you please help me out?</p>

<pre><code>$p = 'aM';

function FormatPeriod($p) {
 $periodFormated = 'null';
 switch($p){
   case "am": $periodFormated = "AM"; break;
   case "Am": $periodFormated = "AM"; break;
   case "aM": $periodFormated = "AM"; break;
   case "pm": $periodFormated = "PM"; break;
   case "Pm": $periodFormated = "PM"; break;
   case "pM": $periodFormated = "PM"; break;
     default: $periodFormated = 'fail';
    }
  return $periodFormated;
 }

$periodFormated = FormatDate($p);
</code></pre>

<p>Sadly, the output is "aM".</p>

<p>Why didn't the string change to "AM"?</p>

<p>~Thank you.</p>
