Answers for "convert number to only 1 decimal place php"

PHP
10

php 3 digit decimal

return number_format((float)$number, 2, '.', '');
Posted by: Guest on October-23-2020
1

how to get a whole number from decimal in php

<?php 
$number = 23.325;

// english notation (default)
$english_format_number = number_format($number);

echo $english_format_number;
//Publisher name - Bathila Sanvidu Jayasundara
?>
Posted by: Guest on August-24-2021

Code answers related to "convert number to only 1 decimal place php"

Browse Popular Code Answers by Language