akshay Posted February 22, 2010 Share Posted February 22, 2010 Hello. How to read in between string with separatation characters... To simplify: Example: $string="username ^ password ^ email"; $a= //should be equal to text before first ^ in $string, i.e. username $b= //should be equal to text between first ^ and second ^, i.e. password $c = // should be equal to text after second ^, i.e. email Is there a way? what about fseek() ? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/192937-search-in-a-string/ Share on other sites More sharing options...
salathe Posted February 22, 2010 Share Posted February 22, 2010 You could use explode. For example, explode(" ", "a b c") gives an array containing a, b and c. Quote Link to comment https://forums.phpfreaks.com/topic/192937-search-in-a-string/#findComment-1016115 Share on other sites More sharing options...
akshay Posted February 22, 2010 Author Share Posted February 22, 2010 Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/192937-search-in-a-string/#findComment-1016131 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.