<?php $tests = [ "€1000", "€66.66", "€-5.0005", ]; $result = []; foreach ($tests as $t) { sscanf($t, '€%d', $result["$t: asInteger"]); sscanf($t, '€%f', $result["$t: asFloat"]); } var_dump($result);
You have javascript disabled. You will not be able to edit any code.