Home >Backend Development >PHP Tutorial > php中的strpos没返回值
php中的strpos没有返回值
echo strpos("jjjj333","jf");没有返回false啊是怎么回事?
------解决方案--------------------
var_dump( strpos("jjjj333","jf")); //这样才行
------解决方案--------------------
if(strpos('jjjj333','jf') === false) { echo "failed"; }else{ echo "success"; } <div class="clear"> </div>