当它找到“0”时,我想变得真实,我无法用这些代码做到这一点:
if (strstr($rSelect['date'],"0") !=FALSE){...}
if (strpos($rSelect['date'],'0') !=FALSE )
当它找到“0”时,我想变得真实,我无法用这些代码做到这一点:
if (strstr($rSelect['date'],"0") !=FALSE){...}
if (strpos($rSelect['date'],'0') !=FALSE )
尝试 strpos() 了解更多详情http://php.net/manual/en/function.strpos.php
$mystring = $rSelect['date'];
$findme = '0';
$pos = strpos($mystring, $findme);
if ($pos === false) {
echo "The string '$findme' was not found in the string '$mystring'";
} else {
echo "The string '$findme' was found in the string '$mystring'";
echo " and exists at position $pos";
}
试试喜欢
if (strrchr($rSelect['date'],"0") !== false) {
echo "No found";
} else {
echo "Match Found";
}