Example Output:

English
(sample input)
Arabic
(auto generated)
George Bush, Paul Wolfowitz جورج بوش باول وولفوويتز
Silvio Berlusconi? سيلفيو برلوسكوني
Guantanamo غوانتانامو
Arizona اريزونه
Maryland ماريلاند
Oracle اوراكل
Yahoo ياهو
Google غوغل
Formula1 فورمولا1
Boeing بوينغ
Caviar كافيار
Telephone تلفون
Internet انترنت
Côte d'Ivoire كوت ديفوير
0123,456.789٠١٢٣,٤٥٦.٧٨٩

Example Code:

<?php
    
require '../../Arabic.php';
    
$Arabic = new I18N_Arabic('Transliteration');

    
$en_terms = array('George Bush, Paul Wolfowitz''Silvio Berlusconi?',
        
'Guantanamo''Arizona''Maryland''Oracle''Yahoo''Google',
        
'Formula1''Boeing''Caviar''Telephone''Internet'"Côte d'Ivoire");

    echo <<< END
<center>
  <table border="0" cellspacing="2" cellpadding="5" width="500">
    <tr>
      <td bgcolor="#27509D" align="center" width="150">
        <b>
          <font color="#ffffff">
            English<br />(sample input)
          </font>
        </b>
      </td>
      <td bgcolor="#27509D" align="center" width="150">
        <b>
          <font color="#ffffff" face="Tahoma">
            Arabic<br />(auto generated)
          </font>
        </b>
      </td>
    </tr>
END;

    foreach (
$en_terms as $term) {
        echo 
'<tr><td bgcolor="#f5f5f5" align="left">'.$term.'</td>';
        echo 
'<td bgcolor="#f5f5f5" align="right"><font face="Tahoma">';
        echo 
$Arabic->en2ar($term);
        echo 
'</font></td></tr>';
    }

    echo 
'<tr><td bgcolor="#d0d0f5" align="left">0123,456.789</td>';
    echo 
'<td bgcolor="#d0d0f5" align="right"><font face="Tahoma">';
    echo 
$Arabic->arNum('0123,456.789');
    echo 
'</font></td></tr>';

    echo 
'</table></center>';

Total execution time is 0.0045621395111084 seconds
Amount of memory allocated to this script is 480056 bytes

Names of included or required files:

Related Class Documentation