Learn From: http://blog.csdn.net/morley_wang/article/details/7859922

  •  strstr(string,search)

strstr() 函数搜索一个字符串在另一个字符串中的第一次出现。

该函数返回字符串的其余部分(从匹配点)。如果未找到所搜索的字符串,则返回 false。

string 必需。规定被搜索的字符串。

search 必需。规定所搜索的字符串。如果该参数是数字,则搜索匹配数字 ASCII 值的字符。

Example 1:
<?php
  echo strstr("Hello world!","world");
?>
输出:world!
 
Example 2:

   搜索 "o" 的 ASCII 值所代表的字符:

<?php
  echo strstr("Hello world!",111);
?>
输出:o world!

相关文章:

  • 2021-11-17
  • 2021-06-08
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-08-06
  • 2021-08-10
猜你喜欢
  • 2022-12-23
  • 2021-10-25
  • 2022-02-22
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2021-08-30
相关资源
相似解决方案