以下是我的代码,其中我只面临一个困难,当我运行以下脚本时,由于比较失败,$flag 没有回显,请让我知道如何解决这个问题?
$s = "iph4on comes";
$se = "4gb comes in iphone";
$f = 0;
$tf = explode(" ",$searching);
$ms= explode(" ",$search_in);
foreach($tf as $word)
{
if (!preg_match("/$word/i", $search_in))
//if (!strpos($search_in, $word));
return false;
}
{
$f = 1;
}
echo $f;
//Due to return flase above i am not echoing
echo "Comparison Failed";