Optimized php check

strpos($ext, 'htm') for .html file gives 0 so if (strpos($ext, 'htm')) gives false, we must use strict comparison to process it properly.

array_search seems to be a good approach, I'll change it. Thanks.