off the top of my head...
function phone_number($str) {
$nums = str_replace(array('(', ')', '-'), '', trim($str));
if (ctype_digit($nums)) {
$len = strlen($nums);
if ($len === 10 || $len === 11) {
return true;
}
}
return false;
}
it depends how strict you want to be