Use preg_replace
to remove any non-digits:
$numbers = preg_replace('/[^\d]/','',$Phone);
Note: '[^\d]' can be replaced with '\D' (safe in non-unicode mode).
What is the difference between "let" and "var"?
How do I replace all occurrences of a string?
How to randomize (shuffle) a JavaScript array?
How do I format a date in JavaScript?
How can I get query string values in JavaScript?
How to access the correct `this` inside a callback
How do I check if a directory exists? "is_dir", "file_exists" or both?
How to create an array from a CSV file using PHP