Hi, Ahmed, Salam wa alaikum,ah neat! i didn't think of this, thanks! it looks a lot simpler than the way i had it done.
While the PHP solution you devised for Arabic numerals using HTML character entity references works just fine, I thought I would present an alternative solution which is simpler and, because it uses the built-in PHP "strtr()" function, may be faster:
http://eyegene.ophthy.med.umich.edu/arabic/index.php