FILTER_SANITIZE_NUMBER_INT
Id of this function is 519. By using FILTER_SANITIZE_NUMBER_INT we can remove all chars except digits and + - signs. Here is an example$str='41!5~6+7'; // Change this value to get different result $str = filter_var($str,FILTER_SANITIZE_NUMBER_INT); echo $str;Output of this is here
4156+7
0 comments:
Post a Comment