I need to check if string contains two or more specific words if so echo words found..i try using this..but if one word is found then it echo found and it now works:
Try code:
if(preg_match("/(s|g898|w63)/i", $string)){
echo 'found';
}
So i try using this example:
$string = 'Today is wonderfull day w63';
Function above need to do nothing.
$string = 'Above the sky limit s g898 w63';
This string need to echo from above function echo 'found'
.
So how to check in PHP if string containts all three specific word and if contains all three echo found?
strpos
first word,strpos
second word.