Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. //remove last word from line
  2. $text = "Hi, I'm Gian Marco";
  3. $last_space_position = strrpos($text, ' ');
  4. $text = substr($text, 0, $last_space_position);
  5. echo $text;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement