Skip to content

Instantly share code, notes, and snippets.

View Oneey's full-sized avatar

Motiur Rahman Oneey

View GitHub Profile
@Oneey
Oneey / bengali2english.php
Created October 31, 2020 12:10 — forked from nasirkhan/bengali2english.php
Convert a Bengali (Bangla) Number to English Number
/**
*
* Input any number in Bengali and the following function will return the English number.
*
*/
function bn2enNumber ($number){
$search_array= array("১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯", "০");
$replace_array= array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
$en_number = str_replace($search_array, $replace_array, $number);