NaniG Posted June 6, 2011 Share Posted June 6, 2011 $test="are/3017-09c90568"; I want to split these to $test[0]='are'; $test[1]='3017'; $test[2]='09c90568'; am tryed these by using preg_split function ($tests=preg_split("/[-]/",$test) getting $test[0]='are/301'; $test[1]='09c90568'; Please any body help me out Quote Link to comment https://forums.phpfreaks.com/topic/238576-preg_split/ Share on other sites More sharing options...
NaniG Posted June 6, 2011 Author Share Posted June 6, 2011 Got it...! Quote Link to comment https://forums.phpfreaks.com/topic/238576-preg_split/#findComment-1226016 Share on other sites More sharing options...
Maq Posted June 6, 2011 Share Posted June 6, 2011 Got it...! Care to share for reference? Quote Link to comment https://forums.phpfreaks.com/topic/238576-preg_split/#findComment-1226019 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.