elpaisa Posted August 20, 2007 Share Posted August 20, 2007 Hi all! I basically need to remove all characters of a string before the first dot for an example: I have a phrase: statistics.STATUS this should be the result: STATUS this is a post var dinamically loaded, so i don't know if to use str_replace or there is another function that i can call. Thanks. all your help is welcome! Quote Link to comment https://forums.phpfreaks.com/topic/65884-php-explode-all-characters-before-the-first-dot/ Share on other sites More sharing options...
MadTechie Posted August 20, 2007 Share Posted August 20, 2007 $data = "statistics.STATUS "; $result = preg_replace('/.*\.(.*)/sim', '$1', $data); Quote Link to comment https://forums.phpfreaks.com/topic/65884-php-explode-all-characters-before-the-first-dot/#findComment-329338 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.