php procurar se o sub-texto está no texto
$result = strpos("haystack", "needle");
if ($result != false)
{
// text found
}
Como posso verificar se um texto contém uma palavra específica?
$a = 'Hello world?';
if (strpos($a, 'Hello') !== false) { //PAY ATTENTION TO !==, not !=
echo 'true';
}
if (stripos($a, 'HELLO') !== false) { //Case insensitive
echo 'true';
}