我有班加利语的时间戳:
$myTime = "২০১৫-০৬-২২ ০৮:৩১:৫৩";
如何在PHP中将其转换为英语...
$myTimeEng = "2015-06-22 08:31:53";
答案 0 :(得分:1)
简短的例子:
<?php
$translate = array('০','১','২','৩','৪','৫','৬','৭','৮','৯'); // 0 1 2 3 4 5 6 7 8 9 in bengali
$myTime = "২০১৫-০৬-২২ ০৮:৩১:৫৩";
$myTime = str_replace($translate, array(0,1,2,3,4,5,6,7,8,9), $myTime);
echo $myTime;
?>