I have the following PHP code which aims to replace any arabic number with english one
$arabic = ['٠','١','٢','٣','٤','٥','٦','٧','٨','٩'];
$english = ['0','1','2','3','4','5','6','7','8','9'];
$id = str_replace($arabic, $english, '۲٤۲۰۸۹۳۰٥٥');
echo $id; // ۲4۲۰۸۹۳۰55
the above code should replace all numbers but obviously it replaced the second number and the last two only, so what seems to be the issue here?
thanks guys.