simple function to remove non numeric characters from a string with PHP


  Remove non-numeric characters from a string.
function stripNonNumeric($str='') {
  return preg_replace('(\D+)', '', $str);

Refer gist for comments

Justin Kelly

Justin Kelly

Data Engineeer, Business Analytics, Web Developer, Library Technology specialising in PHP and Tableau

Based in Melbourne, Australia

Feel free to contact me or _justin_kelly