[Solved] I want a function to remove numbers higher than 5000 in a string [closed]

[ad_1]

PHP < 5.3:

preg_replace_callback('/\s*\d+\s*/', create_function('$a', 'return trim($a[0]) > 5000? " " : $a[0];'), $input);

PHP >= 5.3 (closure support):

preg_replace_callback('/\s*\d+\s*/', function ($a) {
    return trim($a[0]) > 5000? " " : $a[0];
}, $input);

[ad_2]

solved I want a function to remove numbers higher than 5000 in a string [closed]