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

親自試一試

同類函數
  • 返回有關字符串中使用的單詞的信息 str_word_count

    str_word_count

    返回有關字符串中使用的單詞的信息
  • 返回使用htmlspecialchars() 和htmlentities() 後的轉換錶 get_html_translation_table

    get_html_translation_table

    返回使用htmlspecialchars
  • 將字符串轉化為大寫 strtoupper

    strtoupper

    將字符串轉化為大寫
  • 重複一個字符串 str_repeat

    str_repeat

    重複一個字符串
  • 二進制安全字符串比較 strcmp

    strcmp

    二進制安全字符串比較
  • 二進制安全比較字符串開頭的若干個字符 strncmp

    strncmp

    二進制安全比較字符串開頭的若干個字符
  • 將數字格式化成貨幣字符串 money_format

    money_format

    將數字格式化成貨幣字符串
  • 計算給定文件的md5哈希值 md5_file

    md5_file

    計算給定文件的md5哈希值
熱門文章