Function that returns only numbers?
<pre><code>function get_only_numbers($string){
    $getonly = str_split("0123456789");
    $string = str_split($string);
    foreach($string as $i =&gt; $c){
        if(!in_array($c, $getonly))
            unset($string[$i]);
    }
    return implode("", $string);
}

echo get_only_numbers("U$ 499,50"); // prints 49950
</code></pre>

<p>This function is supposed to return only the numbers from a string.
Has this function been coded properly?</p>
