我正在尝试将正常数字的字符串的单个字符替换为阿拉伯语。
我有
$er_num = array('0','1','2','3','4','5','6','7','8','9');
$ar_num = array('٠','١','٢','٣','٤','٥','٦','٧','٨','٩');
echo str_replace($er_num,$ar_num,'12');
它适用于多位数..但是当它出现单个数字时,它没有...
echo str_replace($er_num,$ar_num,'1');