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 ); 总结以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对脚本之家的支持。 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- PHP常用的文件操作函数经典收藏
- mysql limit查询优化分析
- 在C#中生成与PHP一样的MD5 Hash Code的方法
- php Undefined index和Undefined variable的解决方法
- php常用字符串处理函数实例分析
- php判断文件函数is_dir is_file is_link is_uploaded_file
- PHP编程:thinkphp ajaxfileupload实现异步上传图片的示例
- PHP+MYSQL实现用户的增删改查
- php中debug_backtrace、debug_print_backtrace和匿名函数用
- php实现12306火车票余票查询和价格查询(12306火车票查询)
