📌  相关文章
📜  如何检查字符串是否包含特定单词 php 代码示例

📅  最后修改于: 2022-03-11 14:54:02.393000             🧑  作者: Mango

代码示例4
// this method is new with PHP 8 and above
$haystack = "Damn, I wonder if this string contains a comma.";
if (str_contains($haystack, ",")) {
    echo "There is a comma!!";
}