문자열에 단어가 포함되어 있는지 php 확인
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
echo "My string contains Bob";
}
문자열이 포함 된 경우 php 찾기
if (strpos($string, 'substring') !== false) {
// do stuff
}
문자열에 숫자가 포함되어 있는지 php 확인
if (preg_match('/[A-Za-z]/', $myString) && preg_match('/[0-9]/', $myString))
{
echo 'Contains at least one letter and one number';
}