NumberFormatter
We can convert number to string using php built in class NumberFormatter .
|
|
Troubleshooting:
You need to enable php_intl extension, when using NumberFormatter class.
You can enable this from php.ini setting file.
In my case, I am using ubuntu server. I required to install php7.3-intl extension using apt
|
|
I am using php7.3 version. Hence, I have installed php7.3-intl.
Let you are using php7.4, in this case your extension will be php7.4-intl
Once you’ve install extension, you need to enable extension from your php.ini setting file
extension=intl
I am using apache server. So my php.ini file location is
|
|
Once, you have changed in php.ini file, You need to restart your apache2 server
|
|