Kasuke_Akira Posted March 22, 2007 Share Posted March 22, 2007 I have this variable: $str = "4xAura Extraction"; I need it to split the string into two separate strings containing this: $split[0]: 4 $split[1]: Aura Extraction I can't use explode(), because that will split it up again if there are x's other than the one that comes after the number. What would be the best way to get this done. I'm asking because I'm not real good at string manipulation when it comes to mutilating them. lol Thanks Link to comment https://forums.phpfreaks.com/topic/43793-solved-string-manipulation/ Share on other sites More sharing options...
Lumio Posted March 22, 2007 Share Posted March 22, 2007 $split = explode('x', $str, 2); http://us2.php.net/explode Link to comment https://forums.phpfreaks.com/topic/43793-solved-string-manipulation/#findComment-212610 Share on other sites More sharing options...
Kasuke_Akira Posted March 22, 2007 Author Share Posted March 22, 2007 Thanks. Link to comment https://forums.phpfreaks.com/topic/43793-solved-string-manipulation/#findComment-212614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.