From the documentation of php.net array_search() function,
Returns the key for needle if it is found in the array, FALSE otherwise.
Now comes to your question:
why does it not find the zero?
Yes, it does find. Look at the following line,
if(array_search('0', $My_Array)){ ...
In this case array_search() function will return 0 which is the index of element '0' in the array. And because of this, the if block will get executed like this:
if(0){ ...
which basically evaluates to false, and this means the control goes to else block even if it finds element '0' in the array.
So the solution is, change your if block in the following way:
if(array_search('0', $My_Array) !== false){