only 2 digit after decimal in php code example
Example 1: fix to 2 decimal places php
return number_format((float)$number, 2, '.', '');
Example 2: php how to get decimal after devide
$x = 110 % 30;
return number_format((float)$number, 2, '.', '');
$x = 110 % 30;