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? 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)); 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! Link to comment https://forums.phpfreaks.com/topic/37385-strstr/#findComment-178719 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.