gurechan Posted February 7, 2007 Share Posted February 7, 2007 Hi, I know that strstr can be used to return the part of a string that appears after a specific character. I was wondering if there is a function that can return the part of the string that appears before the character? Quote Link to comment https://forums.phpfreaks.com/topic/37385-strstr/ Share on other sites More sharing options...
Jessica Posted February 7, 2007 Share Posted February 7, 2007 $string = substr($str, 0, strpos($str, $chr)); Quote Link to comment https://forums.phpfreaks.com/topic/37385-strstr/#findComment-178710 Share on other sites More sharing options...
gurechan Posted February 7, 2007 Author Share Posted February 7, 2007 cheers! Quote Link to comment https://forums.phpfreaks.com/topic/37385-strstr/#findComment-178719 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.