$string = "The quick brown fox jumps over the lazy dog"; if (preg_match("/brown/", $string)) { echo "The string contains 'brown'"; } else { echo "The string does not contain 'brown'"; }
$string = "The quick brown fox jumps over the lazy dog"; if (preg_match("/brown/", $string)) { echo "The string contains 'brown'"; } else { echo "The string does not contain 'brown'"; }