Source Code:
(back to article)
<?php $original_string = "abc123def456"; $only_numbers = preg_replace("/[^0-9]/", "", $original_string); echo $only_numbers;
Result:
Report an issue