spyros1234 Posted July 22, 2007 Share Posted July 22, 2007 Hello I have a 6 digit number and I want to split it to 2 separate numbers do you know how can I do this ? For example the number 200509 I want to split it in to 2005 and 09. Thank you. Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 22, 2007 Share Posted July 22, 2007 like: <?php $num = "123456"; $num1 = substr($num,0,4); $num2 = substr($num,4,2); echo $num1 . "-" . $num2; ?> edit i saw you wanted 4 numbers and 2 Quote Link to comment 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.