Jul 23, 2002 #1 riffy Programmer Mar 29, 2001 106 US hey everyone, i wanted to know whether it's possible to take a phone number in this format: 123-123-1234 and parse it into this: 123 123 1234 thanks arif
hey everyone, i wanted to know whether it's possible to take a phone number in this format: 123-123-1234 and parse it into this: 123 123 1234 thanks arif
Jul 23, 2002 #2 AnakinPt Programmer Mar 29, 2001 583 PT you can get as simple as: $array=explode("-",$phone); then you have an indexed array with the 3 parts of the phone number $array[0] have the first token. $array[1] the second and $array[2] have the 3rd. and so on. Anikin Hugo Alexandre Dias Web-Programmer anikin_jedi@hotmail.com Upvote 0 Downvote
you can get as simple as: $array=explode("-",$phone); then you have an indexed array with the 3 parts of the phone number $array[0] have the first token. $array[1] the second and $array[2] have the 3rd. and so on. Anikin Hugo Alexandre Dias Web-Programmer anikin_jedi@hotmail.com