I\'m confused by something I just ran into in a script I was working on. I had the following:
function getPart($part) { $array = array(\'a\', \'b\', \'c\');
PHP is weakly typed. What's happening there is it's trying to convert "first" to a number. It fails, and returns zero. It now has two numbers: zero and zero. To make it not try to convert the types, use === rather than ==.
"first"
===
==