I'm trying to find if there's a period in a string with strpos, but for some reason it prints out "There's no period." every time I run the code. I'm not sure what I did wrong.
$text = "Hello.";
if (strpos($text, "." !== false)) {
echo "There's a period.";
}
else {
echo "There's no period.";
}
Expected result
There's a period.
Actual result
There's no period.