1. 首页
  2. 数据库
  3. 其它
  4. php的字符串用法小结

php的字符串用法小结

上传者: 2021-02-25 19:35:46上传 PDF文件 23.24KB 热度 11次
1 求长度,最基本的 $text = “sunny day”; $count = strlen($text); // $count = 9 2 字符串截取 截取前多少个字符 $article = “BREAKING NEWS: In ultimate irony, man bites dog.”; $summary = substr_replace($article, “...”, 40); 3 算单词数 $article = “BREAKING NEWS: In ultimate irony, man bites dog.”; $wordCount = str_word_count($artic
用户评论