In this this tutorial learn How to Check if a string contains a substring in php using a strpos() method - programming technology world
function str_contains(string $string, string $substr): bool
{
return strpos($string, $substr) !== false;
}