how to take 3 digits after decimal in php code example Example: php 3 digit decimal return number_format((float)$number, 2, '.', '');