當前位置: 首頁> 函數類別大全> stripos

stripos

查找字符串首次出現的位置(不區分大小寫)
名稱:stripos
分類:字符串
所屬語言: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">stripos</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>

親自試一試

同類函數
  • 以千位分隔符方式格式化一個數字 number_format

    number_format

    以千位分隔符方式格式化一個數字
  • 從字符串中刪除HTML和PHP標記 strip_tags

    strip_tags

    從字符串中刪除HTML和PHP標記
  • 檢查字符串是否以給定的子字符串開頭 str_starts_with

    str_starts_with

    檢查字符串是否以給定的子字符串開頭
  • 轉換字符串第一個字節為0-255 之間的值 ord

    ord

    轉換字符串第一個字節為0-255之間的值
  • 將一個一維數組的值轉化為字符串 implode

    implode

    將一個一維數組的值轉化為字符串
  • 單向字符串散列 crypt

    crypt

    單向字符串散列
  • 反轉義一個轉義的字符串 stripslashes

    stripslashes

    反轉義一個轉義的字符串
  • 替換字符串的子串 substr_replace

    substr_replace

    替換字符串的子串
熱門文章