Formatting a phone number

What function do I use to frormat a phone number.

Lets say $Num = 5555555555;

but I want $PhoneNum = (555) 555-5555

if it was my script i would use substr to get each section of the number and just change it as u see fit.

http://uk.php.net/manual/en/function.substr.php

Got it thanks, that will work great. Don’t know how I missed that.

Sponsor our Newsletter | Privacy Policy | Terms of Service