I need somebody help, I Would be appreciate it and many thanks
Below as several samples that left side i want to swap to currency format/right side
- 123,00 to 123.00
- 1.123,00€ to 1,123.00
- $11.123,00 to 11,123.00
- 12.123,00 ZH to 12,123.00
- 12.123,00cH to 12,123.00
- £1.123.123,00 to 1,123,123.00
- 112312300 KN to 1,123,123.00
or e.g.
- 1,123.00€ to 1,123.00
- $11.123.00 to 11,123.00
- 12,123,00 ZH to 12,123.00
- 12.123,00cH to 12,123.00
- £1.123,123,00 to 1,123,123.00
- 11,231230.0 KN to 1,123,123.00
that mean whatever in left side it should be change to comma as thousand digit and dot as decimal digit,
it seem could be done using preg_replace or str_replace, but what I should do?
Srip out non-numeric characters, and then pass through
number_format().EDIT added
/ 100since it was adding the decimal places after the original zeros.