Moonsoft Software Solutions

comma formatting

Started 18 Oct 2011 · 1 reply

  1. anonymous
    Hello,

    You can write me how to change that by introducing the data you could use a comma?



    When you enter a data from a comma, eg 5,40 * 5,30 the result is different than when I enter 5.40 * 5.30.

    In my commonly used commas.
  2. Moonsoft support
    Hello,
    if your users introduce commas when writting numbers, you should format the numbers before starting math to provide correct numbers to php functions. We suggest starting using
    str_replace

    function to replace all commas introduced at input for dots.

    Then you could make all calculations.

    And you could show results formatted as your users expect to see the numbers using number_format to specify thousand and decimal separators.


    Hope this helps

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket