Formatting a phone number


#1

What function do I use to frormat a phone number.

Lets say $Num = 5555555555;

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


#2

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


#3

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