The strrchr() function finds the position of the last occurrence of a string within another string, and returns all characters from this position to the end of the string.
My code:
In the first example, I get "OBSVALUE on my text" and that's what I would expect.
In the second, I get "ON my text". I was expecting the same.
Any ideas why there is a variation?
My code:
Code:
echo strrchr("I am searching for OBSVALUE on my text", "OBSVALUE") . "<br>";
echo strrchr("I am searching for OBSVALUE ON my text", "OBSVALUE");
In the first example, I get "OBSVALUE on my text" and that's what I would expect.
In the second, I get "ON my text". I was expecting the same.
Any ideas why there is a variation?