I would like to make dots between my total value.
If i have 425000 i would like it to show as 425.000
Is there a function in php that implodes dots for numbers or how can i do this then?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use number_format for this:
The above example means: format the number, using
0decimal places, an empty string as the decimal point (as we’re not using decimal places anyway), and use.as the thousands separator.Unless of course I misunderstood your intent, and you want to format the number as a number with 3 decimal places:
The above example means: format the number, using
3decimal places,.as the decimal point (default), and an empty string as the thousands separator (defaults to,).If the default thousands separator is good enough for you, you can just use 1:
1) Mind you:
number_formataccepts either 1, 2 or 4 parameters, not 3.