Created
May 23, 2022 17:40
-
-
Save reazul-islam/2deb8512de5af0990bee8be92d39b55b to your computer and use it in GitHub Desktop.
English format to bangla on the run time
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 | |
| class Helper | |
| { | |
| public static $bn = ['১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯', '০']; | |
| public static $en = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']; | |
| public static function bn2en($number) | |
| { | |
| return str_replace(self::$bn, self::$en, $number); | |
| } | |
| public static function en2bn($number) | |
| { | |
| return str_replace(self::$en, self::$bn, $number); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment