当前位置: 首页> 函数类别大全> strrpos

strrpos

计算指定字符串在目标字符串中最后一次出现的位置
名称:strrpos
分类:字符串
所属语言:php
一句话介绍:查找字符串在另一字符串中最后一次出现的位置(对大小写敏感)。

实例

查找 "php" 在字符串中最后一次出现的位置:

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">strrpos</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"You love php, I love php too!"</span><span class="token punctuation">,</span><span class="token string double-quoted-string">"php"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

亲自试一试

同类函数
  • 计算两个字符串之间的相似性 similar_text

    similar_text

    计算两个字符串之间的相似性
  • 计算文件的sha1哈希值 sha1_file

    sha1_file

    计算文件的sha1哈希值
  • 将8位字符串转换为带引号的可打印字符串 quoted_printable_encode

    quoted_printable_encode

    将8位字符串转换为带引号的可打印字符串
  • 二进制安全比较字符串(从偏移位置比较指定长度) substr_compare

    substr_compare

    二进制安全比较字符串(从偏移位置比较指定
  • 从字符串中删除 HTML和PHP标记 strip_tags

    strip_tags

    从字符串中删除HTML和PHP标记
  • 将带引号的可打印字符串转换为8位字符串 quoted_printable_decode

    quoted_printable_decode

    将带引号的可打印字符串转换为8位字符串
  • 使用一个字符串分割另一个字符串为数组 explode

    explode

    使用一个字符串分割另一个字符串为数组
  • rtrim的别名 chop

    chop

    rtrim的别名