Skip to content

Instantly share code, notes, and snippets.

@hasinhayder
Last active August 3, 2022 16:42
Show Gist options
  • Save hasinhayder/d5cf8799d594d438125acd9bd8082da0 to your computer and use it in GitHub Desktop.
Save hasinhayder/d5cf8799d594d438125acd9bd8082da0 to your computer and use it in GitHub Desktop.
change digits from english to unicode locale
<?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