strpos
won't return TRUE
. It will return the position the first character of the 'needle' is found or return FALSE
if it has not been found. For more info check the manual here: http://php.net/manual/en/function.strpos.php
So instead of using
if (strpos($arr_in[$i], $start) === true)
you can check for non-false like this:
if (strpos($arr_in[$i], $start) !== false)