Snippet

  1. <?php
  2. function cleanup_numbers($string) {
  3.   $numbers = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", " ");
  4.   $string = str_replace($numbers, '', $string);
  5.   return $string;
  6.  }
  7.  
  8.    $username='jamrod12345';
  9.   // will print jamrod
  10.    echo cleanup_numbers($username);
  11.        
  12. ?>