This will work...
<?php
$i = 'foo';
switch ($i) {
case 'foo':
print "i equals foo";
break;
case 0:
print "i equals 0";
break;
case 2:
print "i equals 2";
break;
}
?>
...the string 'foo' is returning true when compared to the interger 0, that is because of the way PHP deals with loose types.
When converting a string to a number that has no number equivalents in it will return a zero. Your first test then compares 0 == 0, which return true, also you need to make sure you quote the string inside the switch so that PHP knows its a string. It will work without it, however I wouldn't rely on that behaviour.