PHP: How to remove Numbers from String
For whatever reason if you are looking to remove all instances of numbers from a string in PHP, use the simple function I deviced below.
[php]
function remove_numbers($string) {
$num = array(1,2,3,4,5,6,7,8,9,0);
return str_replace($num, '', $string);
}
[/php]
Examples of using the number removing function.
[php]
echo remove_numbers('123kicks'); //echoes kicks
echo remove_numbers('0t4r45i34c525k345s983!4 ...