Answers for "how to make a return a decimal php"

PHP
1

php echo number with decimal

<?php

$number = 1234.56;

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

// French notation
$nombre_format_francais = number_format($number, 2, ',', ' ');
// 1 234,56

$number = 1234.5678;

// english notation without thousands separator
$english_format_number = number_format($number, 2, '.', '');
// 1234.57

?>
Posted by: Guest on June-07-2021
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 "how to make a return a decimal php"

Browse Popular Code Answers by Language