Here is the code I am looking at.
foreach ($header as $idx => $field) {
if (stripos($field, \'foo\') !== false) {
$cols[\'foo\'] = $idx;
stripos returns the position of a string inside another, and if the string is not found, it returns false, so it's recommended to use the identity comparison operators (===, !==), because PHP considers 0 as a "falsy" value, consider this example:
// Find the position of the 'a' character in the 'abc' string:
stripos('abc', 'a') !== false; // true, position is 0
stripos('abc', 'a') != false; // false, 0 is "falsy"