Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //remove last word from line
- $text = "Hi, I'm Gian Marco";
- $last_space_position = strrpos($text, ' ');
- $text = substr($text, 0, $last_space_position);
- echo $text;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement