Think again. Use akillez' code, but replace strpos with strrpos. It will then return a substring consisting of all characters up to and including the last occurrence of the target character.
If you want to return all characters up to but not including the last occurrence of the target character, take out the '+1'.
<?
function strrrchr($haystack,$needle) {
return substr($haystack,0,strrpos($haystack,$needle));
}
$title = "Hello world. How are you?";
echo strrrchr($title, ' ');
?>