我只想在 php.ini 中将这种格式 dd-mm-yyyy(03-11-1991) 的日期转换成这样的阿拉伯语(1991/111/03)。
答案 我做了这个逻辑,它完美无缺
$dateofbirth_numerial="03-05-2001";
$numerial_no = array("0","1","2","3","4","5","6","7","8","9","-");
$arabic_no = array("۰","۱","۲","۳","۴","۵","۶","۷","۸","۹","/");
$dateofbirth_arabic = str_replace($numerial_no , $arabic_no , $dateofbirth_numerial);
$result = explode('/',$dateofbirth_arabic);
echo $result[2]."/".$result[1]."/".$result[0]; /* yyyy/mm/dd */