I do not know if this is the right list, but if someone could help me with the following
Sure, I'll be glad to help.
I need a function that does this:
I'm not sure if you want me to write the code that does this for you, but I know that I wont. I'm just going to give you the tools that are commonly
used for the tasks your asking for.
function phone($num) {
take num and remove anything that is not a number ex: () - /
http://php.net/preg_replace
If there is not 1 at the start, add a one to the start of the number.
http://php.net/substr
make sure that the number is 10 digits (if not return -1)
http://php.net/strlen
}
Thank you for your help,
In the future, please at least try and attempt to write the code, most people here arnt here to write code for everyone, but to solve problems people are
having with their own code.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php