php remove all but numbers

Solutions on MaxInterview for php remove all but numbers by the best coders in the world

showing results for - "php remove all but numbers"
Mattia
06 Oct 2019
1// Original SOA
2preg_replace('/[^0-9]/', '', '604-619-5135'); // Removes the dahses in 604-619-5135
3
4preg_replace('/[^0-9]/', '', '7#sq7k*77dql'); // = 7777