Am I able to simplify this code? I am getting five strings from a SELECT query, stripping them down to only numbers and adding them.
$sum = preg_replace("/[^0-9]/","",$row['AB']) + preg_replace("/[^0-9]/","",$row['CD']) + preg_replace("/[^0-9]/","",$row['EF']) + preg_replace("/[^0-9]/","",$row['GH']) + preg_replace("/[^0-9]/","",$row['IJ']);
Can I do something like this:
preg_replace("/[^0-9]/","",$sum = $row['AB'] + $row['CD'] + $row['EF'] + $row['GH'] + $row['IJ']);