Skip to content
Advertisement

PHP: How can I remove from String the last word?

How can I remove, with PHP, the last word from a String?

For example the string "Hi, I'm Gian Marco" would become "Hi, I'm Gian".

Advertisement

Answer

try with this :

JavaScript

out put

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement