Good Day, I have a question:
There is a line for example:
abracadabra-cudsa_123-qwerty-text_a-abraca-trollololo-nlo
If the line has a word (marker) = text_a then output: Привет Васа!
If there is a word in the line (marker) = text_b then output: Привет Лана!
If the string is not found text_a or text_b then text_b default: Привет Мир!
I do this:
$text = $_GET['text']; $main_str = $text; //искомый текст $my_str = 'text_a'; $pos = strpos($main_str, $my_str); if ($pos === false) { echo 'Привет Мир!'; }else{ echo 'Привет Васа!'; } But here the problem is that looking for only one word (marker) Help solve! Thank!