I'm currently haveing some trouble with a php function and having it remove any charactors that are not numbers such as [0-9].
<?php
$string = "(9*9*9) abogd 4/8/5-4-8+0+0";
$echo = preg_replace("^[0-9]^", "", $string);
echo $echo;
?>
I would like to know how to setup preg_replace to remove everything except numaric charactors or if there is a function specifcly for this please let me know.