Source Code:
(back to article)
<?php $string = "Hello World"; $search = "o"; $result = strrchr($string, $search); if ($result !== false) { echo "Found last occurrence of '$search' in '$string': '$result'"; } else { echo "Did not find '$search' in '$string'"; }
Result:
Report an issue