glad i could help :)


i'm not a php geek, just wondering what was the purpose or what you wanted to use it for?


tried it and it only prints ١


[EMAIL PROTECTED] wrote:
cool, that worked, jazakAllah khair.  for the purpose of sharing,
here's what i did:

<?php
   function arabize($num){
      $start = strlen('' . $num);
      $val = pow(10, $start-1);

      $result = "";
      while ($val > 1){
         $result = $result . arabizeDigit((int)($num / $val));
         $num = $num % $val;
         $val = $val / 10;
      }
      $result = $result . arabizeDigit($num);
      return $result;
   }

   function arabizeDigit($num){
      $val = 660 + $num;
      return "&#x$val;";
   }


   echo arabize(1);
?>

  

_______________________________________________ Developer mailing list [email protected] http://lists.arabeyes.org/mailman/listinfo/developer
_______________________________________________
Developer mailing list
[email protected]
http://lists.arabeyes.org/mailman/listinfo/developer

رد على