<?php $tests = [ '100,00', '100,12', '122,32', '120,00', '140,00', '123,85' ]; foreach($tests as $test){ echo $test," => ",preg_replace("/(\,0.*)/","",$test),PHP_EOL; }
You have javascript disabled. You will not be able to edit any code.