nrg_alpha wrote:I like the suggestion of using a hybrid of array_map and str_replace best:
Well, if you want to be fancy with functional programming, then why not go out all and use lambda functions? 🙂
$arr = array('1,000,230', '200,345,200', '100,789');
$newArr = array_map(create_function('$x', 'return str_replace(",", "", $x);'), $arr);
echo '<pre>'.print_r($newArr, true);