Wandeln Sie das numerische Datum (03-11-1991) in arabische Nr. (۱۹۹۱/۱۹۹۱/۱۱) php um

Ich möchte nur das Datum, das in diesem Format TT-MM-JJJJ (11.03.1991) ist, in Arabisch Nein wie dieses (۱۹۹۱/۱۹۹۱/۱۱) in PHP konvertieren.

Antworten Ich habe diese Logik erstellt und sie funktioniert perfekt

   $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 */

Antworten auf die Frage(2)

Ihre Antwort auf die Frage