php进修条记之mb_strstr的根基行使
媒介本文首要先容了关于php之mb_strstr根基行使的相干内容,分享出来供各人参考进修,下面话不多说了,来一路看看具体的先容吧。 mb_strstr
Description//mb_strstr() finds the first occurrence of needle in haystack and returns the portion of haystack. If needle is not found,it returns FALSE.//mb_strstr() 查找了 needle 在 haystack 中初次的呈现并返回 haystack 的一部门。 假如 needle 没有找到,它将返回 FALSE。 Parametershaystack
needle
before_needle
encoding
Return Values
Examples// If set to true,it returns all of haystack from the beginning to the first occurrence of needle. $strstr = mb_strstr( "hello china","ll",true ); echo $strstr . PHP_EOL; //he //* If set to false,it returns all of haystack from the first occurrence of needle to the end,$strstr = mb_strstr( "hello china",false ); //hello china $strstr = mb_strstr( "hello China,hello PHP",true ); $strstr = mb_strstr( "hello China,false ); $strstr = mb_strstr( "PHP是天下上最好的说话😄","最好",true ); 总结以上就是这篇文章的所有内容了,但愿本文的内容对各人的进修可能事变具有必然的参考进修代价,假若有疑问各人可以留言交换,感谢各人对编程之家的支持。 (编辑:湖南网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |