If you don't want to mess with the source data and may need to use the "fixed" version in more than one place, you could create a separate variable:
$data2Float = (float) str_replace(',', '', $data2['value']);
...then use $data2Float in your calculation instead of $data2['value'].
Alternatively, if that one calculation is the only place you use it, I'd probably just stick it in-line:
echo number_format(((float) str_replace(',', '', $data['value'])) * 0.0321507466 * 5 * 0.35, 2);