SimpleXML Example Output:

Arabic
CountryCapitalTime ZoneTimeCurrencyLocal DomainDial Codes
AlgeriaAlgiers+1 GMT3:54Algerian dinarhttp://www.example.com.dz+213
BahrainManama+3 GMT5:54Bahraini dinarhttp://www.example.com.bh+973
DjiboutiDjibouti+3 GMT5:54Djiboutian franchttp://www.example.com.dj+253
EgyptCairo+2 GMT4:54Egyptian poundhttp://www.example.com.eg+20
IraqBagdād+4 GMT6:54Iraqi dinarhttp://www.example.com.iq+964
JordanAmmān+3 GMT5:54Jordanian dinarhttp://www.example.com.jo+962
KuwaitAl-Kuwayt+3 GMT5:54Kuwaiti dinarhttp://www.example.com.kw+965
LebanonBayrūt+2 GMT4:54Lebanese lirahttp://www.example.com.lb+961
LibyaTripoli+2 GMT4:54Libyan dinarhttp://www.example.com.ly+218
MauritaniaNouakchott0 GMT2:54Mauritanian ouguiyahttp://www.example.com.mr+222
MoroccoRabat+1 GMT3:54Moroccan dirhamhttp://www.example.com.ma+212
OmanMuscat+4 GMT6:54Omani rialhttp://www.example.com.om+968
PalestineJerusalem+2 GMT4:54US Dollarhttp://www.example.com.ps+970
QatarDoha+3 GMT5:54Qatari riyalhttp://www.example.com.qa+974
Saudi ArabiaRiyadh+3 GMT5:54Saudi riyalhttp://www.example.com.sa+966
SomaliaMuqdisho+3 GMT5:54Somali shillinghttp://www.example.com.so+252
SudanKhartoum+2 GMT4:54Sudanese poundhttp://www.example.com.sd+249
SyriaDamascus+3 GMT5:54Syrian poundhttp://www.example.com.sy+963
TunisiaTunis+1 GMT3:54Tunisian dinarhttp://www.example.com.tn+216
United Arab EmiratesAbu Dhabi+4 GMT6:54United Arab Emirates dirhamhttp://www.example.com.ae+971
YemenŞan'ā+3 GMT5:54Yemeni rialhttp://www.example.com.ye+967

SimpleXML Example Code:

<?php
    error_reporting
(E_STRICT);
    
$time_start microtime(true);

    
// set name of XML file
    
$file '../sub/lists/arab_countries.xml';
    
    
// load XML file
    
$xml simplexml_load_file($file) or die ('Unable to load XML file!');

    if(
$_GET['lang'] == 'arabic') {
        
$lang 'arabic';
        echo 
'<a href="Info.php?lang=english">English</a>';
    } else {
        
$lang 'english';
        echo 
'<a href="Info.php?lang=arabic">Arabic</a>';
    }
    
    echo 
'<table width="98%" cellpadding="5" cellspacing="2">';

    echo 
'<tr>';
    echo 
'<td><b><u>Country</u></b></td>';
    echo 
'<td><b><u>Capital</u></b></td>';
    echo 
'<td><b><u>Time Zone</u></b></td>';
    echo 
'<td><b><u>Time</u></b></td>';
    echo 
'<td><b><u>Currency</u></b></td>';
    echo 
'<td><b><u>Local Domain</u></b></td>';
    echo 
'<td><b><u>Dial Codes</u></b></td>';
    echo 
'</tr>';
    
    
// iterate over <country> element collection
    
foreach ($xml as $country) {
        echo (
$i++ % 2)? '<tr bgcolor="#F5F5F5">' '<tr bgcolor="#E5E5E5">';
        
        echo 
'<td><a href="../sub/lists/'.$country->name->english.'.png" target="_blank">'.$country->name->$lang.'</a></td>';

        
$lat substr($country->capital->latitude0, -3);
        if(
substr($country->capital->latitude, -1) == 'S'$lat = -$lat;
        
        
$lon substr($country->capital->longitude0, -3);
        if(
substr($country->capital->latitude, -1) == 'W'$lon = -$lon;

        echo 
'<td><a href="http://maps.google.com/maps?ll='.$lat.','.$lon.'&t=h&z=10" target="_blank">'
              
.$country->capital->$lang.'</a></td>';

        
$timezone $country->timezone;
        if (
$country->summertime['used'] == 'true') {
            
$start strtotime($country->summertime->start);
            
$end   strtotime($country->summertime->end);
            if (
time() > $start && time() < $end) {
                
$timezone $timezone 1;
                
$timezone '+' $timezone;
            }
        }
        
        echo 
'<td>'.$timezone.' GMT</td>';

        echo 
'<td>'.date('G:i'time()+$timezone*3600).'</td>';

        echo 
'<td><a href="http://www.xe.com/ucc/convert.cgi?Amount=1&From=USD&To='
             
.$country->currency->iso.'" target="_blank">'.$country->currency->$lang.'</a></td>';

        echo 
'<td><a href="http://www.101domain.com/whois-'.strtolower($country->iso3166->a2)
             .
'.php" target="_blank">http://www.example.com.'.strtolower($country->iso3166->a2).'</a></td>';

        echo 
'<td>+'.$country->dialcode.'</td>';
        echo 
'</tr>';
    }

    echo 
'</table>';
    
$xml null;
?>

Total execution time is 0.58485412597656 seconds
Amount of memory allocated to this script is 163104 bytes

Names of included or required files: