use php if inside a string code example
Example: How do I check if a string contains a specific word php
$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}
$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}