我写了下面的代码,但它工作错误:
$t = "۰۱۲۳۴۵۶۷۸۹٤٥٦";
$correct = array("0","1","2","3","4","5","6","7","8","9","4","5","6");
$wrong = array("٠","١","٢","٣","٤","٥","٦","٧","٨","٩","۴","۵","۶");
echo $t = str_replace($wrong,$correct, $t);
结果不对
۰۱۲۳456۷۸۹۰۱۲۳456۷۸۹456
我在堆栈和相同的问题中搜索,它的答案对我没有帮助。