$string = "Hello World Again";
echo substr($string, 0, strrpos( $string, ' ') ); //Hello World
If the character isn’t found, nothing is echoed
$string = "Hello World Again";
echo substr($string, 0, strrpos( $string, ' ') ); //Hello World
If the character isn’t found, nothing is echoed