php zkontrolujte, zda řetězec obsahuje slovo
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
echo "My string contains Bob";
}
stristr php
<?php
$string = 'Hello World!';
if(stristr($string, 'terre') === FALSE) {
echo '"terre" non trouvé dans la chaîne de caractères';
}
// affiche : "terre" non trouvé dans la chaîne de caractères
?>