close


[php]strripos — 計算指定字符串在目標字符串中最後一次出現的位置(不區分大小寫)


官方範例
<?php
$haystack = 'ababcd';
$needle   = 'aB';


$pos      = strripos($haystack, $needle);


if ($pos === false) {
    echo "Sorry, we did not find ($needle) in ($haystack)";
} else {
    echo "Congratulations!\n";
    echo "We found the last ($needle) in ($haystack) at position ($pos)";
}
?>
以上例程會輸出:
   Congratulations!
   We found the last (aB) in (ababcd) at position (2)

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 stockwfj3 的頭像
    stockwfj3

    程式設計@筆記

    stockwfj3 發表在 痞客邦 留言(0) 人氣()