-
-
Save AHS12/b991060c8b4014d7880aa239fcd30764 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