$amt = 32000.05;
echo (preg_replace('/(\.[0-9]+?)0*$/', '$1', $amt));
Result=
32000.05 = 32000.05
32000.00 = 32000
Share on Facebook