Sometime, when you use strpos, it can't work as you expect, please refer to below:
Wrong Way
$pos = strpos($str, $status);
if($pos!==false)
{
.......
}
Right Way
$pos = strpos($str, "$status");
if($pos!==false)
{
.......
}