Home / Programming / PHP / How to Make Rupiah Format Function for Number Using PHP

How to Make Rupiah Format Function for Number Using PHP

/
/
/
18 Views

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…

Recommended  8. PHP Switch Statement
  • Facebook
  • Twitter
  • Linkedin
  • Pinterest

2 Comments

  1. Hi. I have checked your detriamelia.com and i see you’ve got some duplicate content so probably it is
    the reason that you don’t rank hi in google.

    But you can fix this issue fast. There is a tool that
    creates articles like human, just search in google: miftolo’s tools

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar
Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views :