當前位置: 首頁> 函數類別大全> 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>

親自試一試

同類函數
  • strstr的別名 strchr

    strchr

    strstr的別名
  • 標記分割字符串 strtok

    strtok

    標記分割字符串
  • 從字符串的開頭刪除空格(或其他字符) ltrim

    ltrim

    從字符串的開頭刪除空格(或其他字符)
  • 獲取數字格式信息 localeconv

    localeconv

    獲取數字格式信息
  • 不區分大小寫的strstr stristr

    stristr

    不區分大小寫的strstr
  • 計算指定字符串在目標字符串中最後一次出現的位置 strrpos

    strrpos

    計算指定字符串在目標字符串中最後一次出現
  • 檢查字符串是否以給定的子字符串結尾 str_ends_with

    str_ends_with

    檢查字符串是否以給定的子字符串結尾
  • 查詢語言和區域設置信息 nl_langinfo

    nl_langinfo

    查詢語言和區域設置信息