How to Make Rupiah Format Function for Number Using PHP
Fungsi Peformatan Rupiah Pada Angka PHP

How to Make Rupiah Format Function for Number Using PHP

This time let’s discuss about the Rupiah Formatting Function for numbers in PHP. Actually it’s not too difficult, because php itself already provides a special syntax to display commas in numbers, namely number_format(). If we apply it to for example the number 3000, then when it is run it will output like 3,000.

However, the result of number_format () for rupiah is still not quite right. Because the formatting of the rupiah in numbers does not use commas (,), but with a dotted (.), and of course this format is not suitable for rupiah.

For that, I have prepared rupiah function to be used easily and can be used whenever and wherever you are 😀 Please copy the following functions:

How to Make Rupiah Format Function for Number Using PHP

Meanwhile for applying, just use the function as you can see below :

It’s too easy right… just try and apply it by your self this article : How to Make Rupiah Format Function for Number Using PHP above. If you got any difficulities, don’t be shy to comment this article… Happy coding…

[Total: 2    Average: 5/5]
Recommended  3. How to Install Apache, MySQL and PHP in Ubuntu 18.04 LTS Part 2

Detri Amelia Chandra

Hello, I introduce myself Detri Amelia Chandra. Some of my expertise is in System Analysis, Database Design, Artificial Neural Networks and a little in Programming. Check out my thoughts about the world on my blog. I updated this blog a bit rarely, so please keep visit my blog here often ...

This Post Has One Comment

Leave a Reply

Close Menu