I am trying to use preg_replace to ensure that a telephone number contains numbers only, between 11 and 14 digits, and to eliminate any spaces or brackets() the user might enter.
I have this so far but cant figure out how to set up $pattern.
$okphone = preg_replace($pattern,'',$phone);
Can somebody help please.