Exemple #1
0
    \$integer = '-2749.317';
    
    \$text = \$Arabic->int2str(\$integer);
    
    echo "<p dir=ltr align=center>\$integer<br />\$text</p>";
END;
highlight_string($code);
?>
</div><br />

<div class="Paragraph" dir="rtl">
<h2 dir="ltr">Example Output 4: العملات العربية</h2>
<?php 
$Arabic->setFeminine(1);
$number = 24.7;
$text = $Arabic->money2str($number, 'KWD', 'ar');
echo "<p dir=ltr align=center>{$number}<br />{$text}</p>";
?>

</div><br />
<div class="Paragraph">
<h2>Example Code 4:</h2>
<?php 
$code = <<<END
<?php
    require '../../Arabic.php';
    \$Arabic = new I18N_Arabic('Numbers');
    
    \$number = 24.7;
    \$text   = \$Arabic->money2str(\$number, 'KWD', 'ar');
    
Exemple #2
0
 static function convert_number_to_string($num)
 {
     global $Arabic;
     try {
         if (!isset($Arabic)) {
             $Arabic = new I18N_Arabic('Numbers');
         }
         $str = $Arabic->money2str($num, 'JOD', 'ar');
         return $str;
     } catch (Exception $exc) {
         return $num;
     }
 }