davidvandertuijn / number_format_to_decimal
Number Format To Decimal
Installs: 4 520
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.0.0
README
The Number Format to Decimal converter is a versatile tool designed to simplify the process of converting numerical values from various formats into a standardized decimal format. This functionality is particularly beneficial for professionals working with data, finance, or programming, where precise numerical representation is crucial.
Install
composer require davidvandertuijn/number_format_to_decimal
Usage
number_format_to_decimal('1000,99'); // 1000.99 number_format_to_decimal('1000.99'); // 1000.99 number_format_to_decimal('1.000,99'); // 1000.99 number_format_to_decimal('1,000.99'); // 1000.99 number_format_to_decimal('10.000'); // 10000 number_format_to_decimal('100.000'); // 100000 number_format_to_decimal('10,000'); // 10000 number_format_to_decimal('100,000'); // 100000 number_format_to_decimal('1.000.000'); // 1000000 number_format_to_decimal('1.000.000,99'); // 1000000.99 number_format_to_decimal('1,000,000'); // 1000000 number_format_to_decimal('1,000,000.99'); // 1000000.99
Comments
I use this script for many years, if you have a better solution please let me know!