php how to check if a particular word is in string code example
Example: how to check if a string contains a substring in php
$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}
$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}