1. Please Sign Up if you don't have account. And Login if you have account.

Tutorial Print Currency Number Format in PHP

Discussion in 'Webmaster Tutorials' started by dcs202000, Jul 31, 2019.

  1. dcs202000

    dcs202000 Member SN Confirmed Member

    To format currencies we use PHP's native function "number_format()".

    To use the function we need the following parameters:

    number_format(number, number of decimal digits, sign for decimal numbers, sign for thousands units);

    For convenience, here is a practical example:

    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    This is good, for other types of coins just change the signs of the decimals and the unit of thousands, and if you have no decimals remove the number 2.
    vvdgvv likes this.

Share This Page

Turning cookies on makes it easier for you to browse the web. Cookies are files created by websites you’ve visited, which store information, like the language you prefer or profile information. At Scriptznull, we use cookies to improve the quality of our service. Check our Privacy Policy for more information about cookies. Okay More information