Originally posted by aaron_karp
Well, that looks like it would work. I suppose afterwards I can just plug the commas back in. Thanks.
...or just stick the old format versions in as the array keys:
$array = array('54,234.23', '39.02', '105,208', 88.8);
foreach ($array as $key => $value)
{
$new_value = str_replace(',', '', $value);
settype($new_value, 'float');
$new_array[$value] = $new_value;
}
asort($new_array);
print_r($new_array);