• Home
  • PHP
  • Chart
  • Class
  • Components
  • Cookie Session
  • Data Structure
  • Data Type
  • Date
  • Design Patterns
  • Development
  • DNS
  • Email
  • File Directory
  • Form
  • Functions
  • Graphics Image
  • HTML
  • Language Basics
  • Login Authentication
  • Math
  • MySQL Database
  • Network
  • Operator
  • PDF
  • Reflection
  • Statement
  • String
  • Utility Function
  • Web Services SOAP WSDL
  • XML

number_format « Data Type « PHP






  1. PHP
  2. Data Type
  3. number_format
1.Format an integer and a floating-point value with the number_format() function.
2.Formatting Numbers As Text
3.number_format for English format and Italian format
4.number_format($n, $p, $t, $d) rounds $n to $p decimal places, using $t as the thousands separator and $d as the decimal separator.
5.number_format($n,$p) rounds $n to $p decimal places, adding commas between thousands
6.number_format() enables us to determine the precision we require using a second argument: an integer.
7.number_format: the second parameter indicates the number of decimals after the decimal point
8.Printing a formatted number

java2s.com  | © Demo Source and Support. All rights reserved.