-
-
Save muinjs/e4c1aaff361b2bb870f3ce4e6d3e8ad9 to your computer and use it in GitHub Desktop.
change digits from english to unicode locale
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function changeDigitsEtoB( $digits ) { | |
| $bangla = numfmt_format(numfmt_create( 'bn_BD', NumberFormatter::TYPE_DEFAULT ),$digits); //Bangla locale | |
| return $bangla; | |
| } | |
| echo changeDigitsEtoB(1234); //output ১২৩৪ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment