How to remove all non-numeric characters from a string in php?
In this post, We can remove all non-alphanumeric characters from the string with preg_replace() function in PHP.
1. Code:
2. Example:
Input:
"Soltuts.com 1 is2 providin3 PHP4 tutorials5"
Output:
12345