📌  相关文章
📜  检查字符串是否包含字符 php 代码示例

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

代码示例6
// 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!!";
}