Log in to like this post! Using jQuery Grid with PHP [Infragistics] Murtaza Abdeali / Wednesday, February 8, 2012 “Develop a suite of light weight Client Controls that enable creating better website experiences in browsers across platforms & devices backed by any server data end-point. “ The line above is the vision statement from a presentation that I gave to the Infragistics board almost two years ago, and also to our top line customers to get feedback on the strategy. It was approved even though it was a tough bet, and the plan was set in motion. Two years later, I cannot be more happy to see what has come out of it, a jQuery based client toolset as part of our NetAdvantage for jQuery product offering. The question today is, is it living up to the vision? I thought what better way to prove it than putting it to test. Good that our architect on the product Angel Todorov, is also well-versed in PHP and with less than an hour of him training me on some code demonstrating our jQuery Grid with PHP, I decided to share it as a blog post. It is a validation that the jQuery widgets are purely client-side that can tie in with any web framework or service data point. So, in today’s blog, I am going to bind the jQuery grid against a PHP service which is going to get data from a MySQL database. In the end, this is what the grid is going to look like. I think these widgets are going to make PHP web applications so much more awesome. Setting up the PHP service I am going to use a sample MySQL that contains some statistical data on countries. I am going to setup a service that can get the following information from the Country table and pass it as a JSON string to the client. Country Code Country Name Continent Region Head of State GNP Population Life Expectancy This service is also going to support paging & sorting of the data. Get All Data The first piece I am going to start with is setting up the PHP service to get all the data and display in the grid. For that, I need to create a DB connection and grab all the data from the country table. Next, I am going to convert that into a JSON object, and send it to the requesting client. 1: <?php 2: 3: $dbhost = '127.0.0.1'; // this is the MySQL IP 4: $dbuser = 'tester'; // those are the MySQL username & password 5: $dbpass = 'tester'; 6: 7: //Create the MySQL connection 8: $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error()); 9: $dbname = 'test'; 10: mysql_select_db($dbname) or die (mysql_error()); 11: $data = mysql_query($q) or die(mysql_error()); 12: 13: //Select all data from Country 14: $recQ = "SELECT COUNT(*) from country"; 15: 16: $recCount = mysql_query($recQ) or die (mysql_error()); 17: 18: $rows = array(); 19: while($r = mysql_fetch_assoc($data)) { 20: $rows[] = $r; 21: } 22: 23: //Serializing data to JSON array and sending it back 24: header("Content-type: application/json"); 25: $arr = mysql_fetch_array($recCount); 26: $response = array("totalCount" => $arr[0], "records" => $rows); 27: echo json_encode($response); 28: 29: mysql_close($conn); 30: ?> Now when I make the call to the PHP service, it returns the following json data, which means the service is doing what it is supposed to do. 1: {"totalCount":"239","records":[{"Code":"AFG","Name":"Afghanistan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"652090.00","IndepYear":"1919","Population":"22720000","LifeExpectancy":"45.9","GNP":"5976.00","GNPOld":null,"LocalName":"Afganistan\/Afqanestan","GovernmentForm":"Islamic Emirate","HeadOfState":"Mohammad Omar","Capital":"1","Code2":"AF"},{"Code":"NLD","Name":"Netherlands","Continent":"Europe","Region":"Western Europe","SurfaceArea":"41526.00","IndepYear":"1581","Population":"15864000","LifeExpectancy":"78.3","GNP":"371362.00","GNPOld":"360478.00","LocalName":"Nederland","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Beatrix","Capital":"5","Code2":"NL"},{"Code":"ANT","Name":"Netherlands Antilles","Continent":"North America","Region":"Caribbean","SurfaceArea":"800.00","IndepYear":null,"Population":"217000","LifeExpectancy":"74.7","GNP":"1941.00","GNPOld":null,"LocalName":"Nederlandse Antillen","GovernmentForm":"Nonmetropolitan Territory of The Netherlands","HeadOfState":"Beatrix","Capital":"33","Code2":"AN"},{"Code":"ALB","Name":"Albania","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"28748.00","IndepYear":"1912","Population":"3401200","LifeExpectancy":"71.6","GNP":"3205.00","GNPOld":"2500.00","LocalName":"Shqip\u00ebria","GovernmentForm":"Republic","HeadOfState":"Rexhep Mejdani","Capital":"34","Code2":"AL"},{"Code":"DZA","Name":"Algeria","Continent":"Africa","Region":"Northern Africa","SurfaceArea":"2381741.00","IndepYear":"1962","Population":"31471000","LifeExpectancy":"69.7","GNP":"49982.00","GNPOld":"46966.00","LocalName":"Al-Jaza\u2019ir\/Alg\u00e9rie","GovernmentForm":"Republic","HeadOfState":"Abdelaziz Bouteflika","Capital":"35","Code2":"DZ"},{"Code":"ASM","Name":"American Samoa","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"199.00","IndepYear":null,"Population":"68000","LifeExpectancy":"75.1","GNP":"334.00","GNPOld":null,"LocalName":"Amerika Samoa","GovernmentForm":"US Territory","HeadOfState":"George W. Bush","Capital":"54","Code2":"AS"},{"Code":"AND","Name":"Andorra","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"468.00","IndepYear":"1278","Population":"78000","LifeExpectancy":"83.5","GNP":"1630.00","GNPOld":null,"LocalName":"Andorra","GovernmentForm":"Parliamentary Coprincipality","HeadOfState":"","Capital":"55","Code2":"AD"},{"Code":"AGO","Name":"Angola","Continent":"Africa","Region":"Central Africa","SurfaceArea":"1246700.00","IndepYear":"1975","Population":"12878000","LifeExpectancy":"38.3","GNP":"6648.00","GNPOld":"7984.00","LocalName":"Angola","GovernmentForm":"Republic","HeadOfState":"Jos\u00e9 Eduardo dos Santos","Capital":"56","Code2":"AO"},{"Code":"AIA","Name":"Anguilla","Continent":"North America","Region":"Caribbean","SurfaceArea":"96.00","IndepYear":null,"Population":"8000","LifeExpectancy":"76.1","GNP":"63.20","GNPOld":null,"LocalName":"Anguilla","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"62","Code2":"AI"},{"Code":"ATG","Name":"Antigua and Barbuda","Continent":"North America","Region":"Caribbean","SurfaceArea":"442.00","IndepYear":"1981","Population":"68000","LifeExpectancy":"70.5","GNP":"612.00","GNPOld":"584.00","LocalName":"Antigua and Barbuda","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"63","Code2":"AG"},{"Code":"ARE","Name":"United Arab Emirates","Continent":"Asia","Region":"Middle East","SurfaceArea":"83600.00","IndepYear":"1971","Population":"2441000","LifeExpectancy":"74.1","GNP":"37966.00","GNPOld":"36846.00","LocalName":"Al-Imarat al-\u00b4Arabiya al-Muttahida","GovernmentForm":"Emirate Federation","HeadOfState":"Zayid bin Sultan al-Nahayan","Capital":"65","Code2":"AE"},{"Code":"ARG","Name":"Argentina","Continent":"South America","Region":"South America","SurfaceArea":"2780400.00","IndepYear":"1816","Population":"37032000","LifeExpectancy":"75.1","GNP":"340238.00","GNPOld":"323310.00","LocalName":"Argentina","GovernmentForm":"Federal Republic","HeadOfState":"Fernando de la R\u00faa","Capital":"69","Code2":"AR"},{"Code":"ARM","Name":"Armenia","Continent":"Asia","Region":"Middle East","SurfaceArea":"29800.00","IndepYear":"1991","Population":"3520000","LifeExpectancy":"66.4","GNP":"1813.00","GNPOld":"1627.00","LocalName":"Hajastan","GovernmentForm":"Republic","HeadOfState":"Robert Kot\u0161arjan","Capital":"126","Code2":"AM"},{"Code":"ABW","Name":"Aruba","Continent":"North America","Region":"Caribbean","SurfaceArea":"193.00","IndepYear":null,"Population":"103000","LifeExpectancy":"78.4","GNP":"828.00","GNPOld":"793.00","LocalName":"Aruba","GovernmentForm":"Nonmetropolitan Territory of The Netherlands","HeadOfState":"Beatrix","Capital":"129","Code2":"AW"},{"Code":"AUS","Name":"Australia","Continent":"Oceania","Region":"Australia and New Zealand","SurfaceArea":"7741220.00","IndepYear":"1901","Population":"18886000","LifeExpectancy":"79.8","GNP":"351182.00","GNPOld":"392911.00","LocalName":"Australia","GovernmentForm":"Constitutional Monarchy, Federation","HeadOfState":"Elisabeth II","Capital":"135","Code2":"AU"},{"Code":"AZE","Name":"Azerbaijan","Continent":"Asia","Region":"Middle East","SurfaceArea":"86600.00","IndepYear":"1991","Population":"7734000","LifeExpectancy":"62.9","GNP":"4127.00","GNPOld":"4100.00","LocalName":"Az\u00e4rbaycan","GovernmentForm":"Federal Republic","HeadOfState":"Heyd\u00e4r \u00c4liyev","Capital":"144","Code2":"AZ"},{"Code":"BHS","Name":"Bahamas","Continent":"North America","Region":"Caribbean","SurfaceArea":"13878.00","IndepYear":"1973","Population":"307000","LifeExpectancy":"71.1","GNP":"3527.00","GNPOld":"3347.00","LocalName":"The Bahamas","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"148","Code2":"BS"},{"Code":"BHR","Name":"Bahrain","Continent":"Asia","Region":"Middle East","SurfaceArea":"694.00","IndepYear":"1971","Population":"617000","LifeExpectancy":"73.0","GNP":"6366.00","GNPOld":"6097.00","LocalName":"Al-Bahrayn","GovernmentForm":"Monarchy (Emirate)","HeadOfState":"Hamad ibn Isa al-Khalifa","Capital":"149","Code2":"BH"},{"Code":"BGD","Name":"Bangladesh","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"143998.00","IndepYear":"1971","Population":"129155000","LifeExpectancy":"60.2","GNP":"32852.00","GNPOld":"31966.00","LocalName":"Bangladesh","GovernmentForm":"Republic","HeadOfState":"Shahabuddin Ahmad","Capital":"150","Code2":"BD"},{"Code":"BRB","Name":"Barbados","Continent":"North America","Region":"Caribbean","SurfaceArea":"430.00","IndepYear":"1966","Population":"270000","LifeExpectancy":"73.0","GNP":"2223.00","GNPOld":"2186.00","LocalName":"Barbados","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"174","Code2":"BB"},{"Code":"BEL","Name":"Belgium","Continent":"Europe","Region":"Western Europe","SurfaceArea":"30518.00","IndepYear":"1830","Population":"10239000","LifeExpectancy":"77.8","GNP":"249704.00","GNPOld":"243948.00","LocalName":"Belgi\u00eb\/Belgique","GovernmentForm":"Constitutional Monarchy, Federation","HeadOfState":"Albert II","Capital":"179","Code2":"BE"},{"Code":"BLZ","Name":"Belize","Continent":"North America","Region":"Central America","SurfaceArea":"22696.00","IndepYear":"1981","Population":"241000","LifeExpectancy":"70.9","GNP":"630.00","GNPOld":"616.00","LocalName":"Belize","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"185","Code2":"BZ"},{"Code":"BEN","Name":"Benin","Continent":"Africa","Region":"Western Africa","SurfaceArea":"112622.00","IndepYear":"1960","Population":"6097000","LifeExpectancy":"50.2","GNP":"2357.00","GNPOld":"2141.00","LocalName":"B\u00e9nin","GovernmentForm":"Republic","HeadOfState":"Mathieu K\u00e9r\u00e9kou","Capital":"187","Code2":"BJ"},{"Code":"BMU","Name":"Bermuda","Continent":"North America","Region":"North America","SurfaceArea":"53.00","IndepYear":null,"Population":"65000","LifeExpectancy":"76.9","GNP":"2328.00","GNPOld":"2190.00","LocalName":"Bermuda","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"191","Code2":"BM"},{"Code":"BTN","Name":"Bhutan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"47000.00","IndepYear":"1910","Population":"2124000","LifeExpectancy":"52.4","GNP":"372.00","GNPOld":"383.00","LocalName":"Druk-Yul","GovernmentForm":"Monarchy","HeadOfState":"Jigme Singye Wangchuk","Capital":"192","Code2":"BT"},{"Code":"BOL","Name":"Bolivia","Continent":"South America","Region":"South America","SurfaceArea":"1098581.00","IndepYear":"1825","Population":"8329000","LifeExpectancy":"63.7","GNP":"8571.00","GNPOld":"7967.00","LocalName":"Bolivia","GovernmentForm":"Republic","HeadOfState":"Hugo B\u00e1nzer Su\u00e1rez","Capital":"194","Code2":"BO"},{"Code":"BIH","Name":"Bosnia and Herzegovina","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"51197.00","IndepYear":"1992","Population":"3972000","LifeExpectancy":"71.5","GNP":"2841.00","GNPOld":null,"LocalName":"Bosna i Hercegovina","GovernmentForm":"Federal Republic","HeadOfState":"Ante Jelavic","Capital":"201","Code2":"BA"},{"Code":"BWA","Name":"Botswana","Continent":"Africa","Region":"Southern Africa","SurfaceArea":"581730.00","IndepYear":"1966","Population":"1622000","LifeExpectancy":"39.3","GNP":"4834.00","GNPOld":"4935.00","LocalName":"Botswana","GovernmentForm":"Republic","HeadOfState":"Festus G. Mogae","Capital":"204","Code2":"BW"},{"Code":"BRA","Name":"Brazil","Continent":"South America","Region":"South America","SurfaceArea":"8547403.00","IndepYear":"1822","Population":"170115000","LifeExpectancy":"62.9","GNP":"776739.00","GNPOld":"804108.00","LocalName":"Brasil","GovernmentForm":"Federal Republic","HeadOfState":"Fernando Henrique Cardoso","Capital":"211","Code2":"BR"},{"Code":"GBR","Name":"United Kingdom","Continent":"Europe","Region":"British Islands","SurfaceArea":"242900.00","IndepYear":"1066","Population":"59623400","LifeExpectancy":"77.7","GNP":"1378330.00","GNPOld":"1296830.00","LocalName":"United Kingdom","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"456","Code2":"GB"},{"Code":"VGB","Name":"Virgin Islands, British","Continent":"North America","Region":"Caribbean","SurfaceArea":"151.00","IndepYear":null,"Population":"21000","LifeExpectancy":"75.4","GNP":"612.00","GNPOld":"573.00","LocalName":"British Virgin Islands","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"537","Code2":"VG"},{"Code":"BRN","Name":"Brunei","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"5765.00","IndepYear":"1984","Population":"328000","LifeExpectancy":"73.6","GNP":"11705.00","GNPOld":"12460.00","LocalName":"Brunei Darussalam","GovernmentForm":"Monarchy (Sultanate)","HeadOfState":"Haji Hassan al-Bolkiah","Capital":"538","Code2":"BN"},{"Code":"BGR","Name":"Bulgaria","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"110994.00","IndepYear":"1908","Population":"8190900","LifeExpectancy":"70.9","GNP":"12178.00","GNPOld":"10169.00","LocalName":"Balgarija","GovernmentForm":"Republic","HeadOfState":"Petar Stojanov","Capital":"539","Code2":"BG"},{"Code":"BFA","Name":"Burkina Faso","Continent":"Africa","Region":"Western Africa","SurfaceArea":"274000.00","IndepYear":"1960","Population":"11937000","LifeExpectancy":"46.7","GNP":"2425.00","GNPOld":"2201.00","LocalName":"Burkina Faso","GovernmentForm":"Republic","HeadOfState":"Blaise Compaor\u00e9","Capital":"549","Code2":"BF"},{"Code":"BDI","Name":"Burundi","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"27834.00","IndepYear":"1962","Population":"6695000","LifeExpectancy":"46.2","GNP":"903.00","GNPOld":"982.00","LocalName":"Burundi\/Uburundi","GovernmentForm":"Republic","HeadOfState":"Pierre Buyoya","Capital":"552","Code2":"BI"},{"Code":"CYM","Name":"Cayman Islands","Continent":"North America","Region":"Caribbean","SurfaceArea":"264.00","IndepYear":null,"Population":"38000","LifeExpectancy":"78.9","GNP":"1263.00","GNPOld":"1186.00","LocalName":"Cayman Islands","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"553","Code2":"KY"},{"Code":"CHL","Name":"Chile","Continent":"South America","Region":"South America","SurfaceArea":"756626.00","IndepYear":"1810","Population":"15211000","LifeExpectancy":"75.7","GNP":"72949.00","GNPOld":"75780.00","LocalName":"Chile","GovernmentForm":"Republic","HeadOfState":"Ricardo Lagos Escobar","Capital":"554","Code2":"CL"},{"Code":"COK","Name":"Cook Islands","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"236.00","IndepYear":null,"Population":"20000","LifeExpectancy":"71.1","GNP":"100.00","GNPOld":null,"LocalName":"The Cook Islands","GovernmentForm":"Nonmetropolitan Territory of New Zealand","HeadOfState":"Elisabeth II","Capital":"583","Code2":"CK"},{"Code":"CRI","Name":"Costa Rica","Continent":"North America","Region":"Central America","SurfaceArea":"51100.00","IndepYear":"1821","Population":"4023000","LifeExpectancy":"75.8","GNP":"10226.00","GNPOld":"9757.00","LocalName":"Costa Rica","GovernmentForm":"Republic","HeadOfState":"Miguel \u00c1ngel Rodr\u00edguez Echeverr\u00eda","Capital":"584","Code2":"CR"},{"Code":"DJI","Name":"Djibouti","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"23200.00","IndepYear":"1977","Population":"638000","LifeExpectancy":"50.8","GNP":"382.00","GNPOld":"373.00","LocalName":"Djibouti\/Jibuti","GovernmentForm":"Republic","HeadOfState":"Ismail Omar Guelleh","Capital":"585","Code2":"DJ"},{"Code":"DMA","Name":"Dominica","Continent":"North America","Region":"Caribbean","SurfaceArea":"751.00","IndepYear":"1978","Population":"71000","LifeExpectancy":"73.4","GNP":"256.00","GNPOld":"243.00","LocalName":"Dominica","GovernmentForm":"Republic","HeadOfState":"Vernon Shaw","Capital":"586","Code2":"DM"},{"Code":"DOM","Name":"Dominican Republic","Continent":"North America","Region":"Caribbean","SurfaceArea":"48511.00","IndepYear":"1844","Population":"8495000","LifeExpectancy":"73.2","GNP":"15846.00","GNPOld":"15076.00","LocalName":"Rep\u00fablica Dominicana","GovernmentForm":"Republic","HeadOfState":"Hip\u00f3lito Mej\u00eda Dom\u00ednguez","Capital":"587","Code2":"DO"},{"Code":"ECU","Name":"Ecuador","Continent":"South America","Region":"South America","SurfaceArea":"283561.00","IndepYear":"1822","Population":"12646000","LifeExpectancy":"71.1","GNP":"19770.00","GNPOld":"19769.00","LocalName":"Ecuador","GovernmentForm":"Republic","HeadOfState":"Gustavo Noboa Bejarano","Capital":"594","Code2":"EC"},{"Code":"EGY","Name":"Egypt","Continent":"Africa","Region":"Northern Africa","SurfaceArea":"1001449.00","IndepYear":"1922","Population":"68470000","LifeExpectancy":"63.3","GNP":"82710.00","GNPOld":"75617.00","LocalName":"Misr","GovernmentForm":"Republic","HeadOfState":"Hosni Mubarak","Capital":"608","Code2":"EG"},{"Code":"SLV","Name":"El Salvador","Continent":"North America","Region":"Central America","SurfaceArea":"21041.00","IndepYear":"1841","Population":"6276000","LifeExpectancy":"69.7","GNP":"11863.00","GNPOld":"11203.00","LocalName":"El Salvador","GovernmentForm":"Republic","HeadOfState":"Francisco Guillermo Flores P\u00e9rez","Capital":"645","Code2":"SV"},{"Code":"ERI","Name":"Eritrea","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"117600.00","IndepYear":"1993","Population":"3850000","LifeExpectancy":"55.8","GNP":"650.00","GNPOld":"755.00","LocalName":"Ertra","GovernmentForm":"Republic","HeadOfState":"Isayas Afewerki [Isaias Afwerki]","Capital":"652","Code2":"ER"},{"Code":"ESP","Name":"Spain","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"505992.00","IndepYear":"1492","Population":"39441700","LifeExpectancy":"78.8","GNP":"553233.00","GNPOld":"532031.00","LocalName":"Espa\u00f1a","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Juan Carlos I","Capital":"653","Code2":"ES"},{"Code":"ZAF","Name":"South Africa","Continent":"Africa","Region":"Southern Africa","SurfaceArea":"1221037.00","IndepYear":"1910","Population":"40377000","LifeExpectancy":"51.1","GNP":"116729.00","GNPOld":"129092.00","LocalName":"South Africa","GovernmentForm":"Republic","HeadOfState":"Thabo Mbeki","Capital":"716","Code2":"ZA"},{"Code":"ETH","Name":"Ethiopia","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"1104300.00","IndepYear":"-1000","Population":"62565000","LifeExpectancy":"45.2","GNP":"6353.00","GNPOld":"6180.00","LocalName":"YeItyop\u00b4iya","GovernmentForm":"Republic","HeadOfState":"Negasso Gidada","Capital":"756","Code2":"ET"},{"Code":"FLK","Name":"Falkland Islands","Continent":"South America","Region":"South America","SurfaceArea":"12173.00","IndepYear":null,"Population":"2000","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Falkland Islands","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"763","Code2":"FK"},{"Code":"FJI","Name":"Fiji Islands","Continent":"Oceania","Region":"Melanesia","SurfaceArea":"18274.00","IndepYear":"1970","Population":"817000","LifeExpectancy":"67.9","GNP":"1536.00","GNPOld":"2149.00","LocalName":"Fiji Islands","GovernmentForm":"Republic","HeadOfState":"Josefa Iloilo","Capital":"764","Code2":"FJ"},{"Code":"PHL","Name":"Philippines","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"300000.00","IndepYear":"1946","Population":"75967000","LifeExpectancy":"67.5","GNP":"65107.00","GNPOld":"82239.00","LocalName":"Pilipinas","GovernmentForm":"Republic","HeadOfState":"Gloria Macapagal-Arroyo","Capital":"766","Code2":"PH"},{"Code":"FRO","Name":"Faroe Islands","Continent":"Europe","Region":"Nordic Countries","SurfaceArea":"1399.00","IndepYear":null,"Population":"43000","LifeExpectancy":"78.4","GNP":"0.00","GNPOld":null,"LocalName":"F\u00f8royar","GovernmentForm":"Part of Denmark","HeadOfState":"Margrethe II","Capital":"901","Code2":"FO"},{"Code":"GAB","Name":"Gabon","Continent":"Africa","Region":"Central Africa","SurfaceArea":"267668.00","IndepYear":"1960","Population":"1226000","LifeExpectancy":"50.1","GNP":"5493.00","GNPOld":"5279.00","LocalName":"Le Gabon","GovernmentForm":"Republic","HeadOfState":"Omar Bongo","Capital":"902","Code2":"GA"},{"Code":"GMB","Name":"Gambia","Continent":"Africa","Region":"Western Africa","SurfaceArea":"11295.00","IndepYear":"1965","Population":"1305000","LifeExpectancy":"53.2","GNP":"320.00","GNPOld":"325.00","LocalName":"The Gambia","GovernmentForm":"Republic","HeadOfState":"Yahya Jammeh","Capital":"904","Code2":"GM"},{"Code":"GEO","Name":"Georgia","Continent":"Asia","Region":"Middle East","SurfaceArea":"69700.00","IndepYear":"1991","Population":"4968000","LifeExpectancy":"64.5","GNP":"6064.00","GNPOld":"5924.00","LocalName":"Sakartvelo","GovernmentForm":"Republic","HeadOfState":"Eduard \u0160evardnadze","Capital":"905","Code2":"GE"},{"Code":"GHA","Name":"Ghana","Continent":"Africa","Region":"Western Africa","SurfaceArea":"238533.00","IndepYear":"1957","Population":"20212000","LifeExpectancy":"57.4","GNP":"7137.00","GNPOld":"6884.00","LocalName":"Ghana","GovernmentForm":"Republic","HeadOfState":"John Kufuor","Capital":"910","Code2":"GH"},{"Code":"GIB","Name":"Gibraltar","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"6.00","IndepYear":null,"Population":"25000","LifeExpectancy":"79.0","GNP":"258.00","GNPOld":null,"LocalName":"Gibraltar","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"915","Code2":"GI"},{"Code":"GRD","Name":"Grenada","Continent":"North America","Region":"Caribbean","SurfaceArea":"344.00","IndepYear":"1974","Population":"94000","LifeExpectancy":"64.5","GNP":"318.00","GNPOld":null,"LocalName":"Grenada","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"916","Code2":"GD"},{"Code":"GRL","Name":"Greenland","Continent":"North America","Region":"North America","SurfaceArea":"2166090.00","IndepYear":null,"Population":"56000","LifeExpectancy":"68.1","GNP":"0.00","GNPOld":null,"LocalName":"Kalaallit Nunaat\/Gr\u00f8nland","GovernmentForm":"Part of Denmark","HeadOfState":"Margrethe II","Capital":"917","Code2":"GL"},{"Code":"GLP","Name":"Guadeloupe","Continent":"North America","Region":"Caribbean","SurfaceArea":"1705.00","IndepYear":null,"Population":"456000","LifeExpectancy":"77.0","GNP":"3501.00","GNPOld":null,"LocalName":"Guadeloupe","GovernmentForm":"Overseas Department of France","HeadOfState":"Jacques Chirac","Capital":"919","Code2":"GP"},{"Code":"GUM","Name":"Guam","Continent":"Oceania","Region":"Micronesia","SurfaceArea":"549.00","IndepYear":null,"Population":"168000","LifeExpectancy":"77.8","GNP":"1197.00","GNPOld":"1136.00","LocalName":"Guam","GovernmentForm":"US Territory","HeadOfState":"George W. Bush","Capital":"921","Code2":"GU"},{"Code":"GTM","Name":"Guatemala","Continent":"North America","Region":"Central America","SurfaceArea":"108889.00","IndepYear":"1821","Population":"11385000","LifeExpectancy":"66.2","GNP":"19008.00","GNPOld":"17797.00","LocalName":"Guatemala","GovernmentForm":"Republic","HeadOfState":"Alfonso Portillo Cabrera","Capital":"922","Code2":"GT"},{"Code":"GIN","Name":"Guinea","Continent":"Africa","Region":"Western Africa","SurfaceArea":"245857.00","IndepYear":"1958","Population":"7430000","LifeExpectancy":"45.6","GNP":"2352.00","GNPOld":"2383.00","LocalName":"Guin\u00e9e","GovernmentForm":"Republic","HeadOfState":"Lansana Cont\u00e9","Capital":"926","Code2":"GN"},{"Code":"GNB","Name":"Guinea-Bissau","Continent":"Africa","Region":"Western Africa","SurfaceArea":"36125.00","IndepYear":"1974","Population":"1213000","LifeExpectancy":"49.0","GNP":"293.00","GNPOld":"272.00","LocalName":"Guin\u00e9-Bissau","GovernmentForm":"Republic","HeadOfState":"Kumba Ial\u00e1","Capital":"927","Code2":"GW"},{"Code":"GUY","Name":"Guyana","Continent":"South America","Region":"South America","SurfaceArea":"214969.00","IndepYear":"1966","Population":"861000","LifeExpectancy":"64.0","GNP":"722.00","GNPOld":"743.00","LocalName":"Guyana","GovernmentForm":"Republic","HeadOfState":"Bharrat Jagdeo","Capital":"928","Code2":"GY"},{"Code":"HTI","Name":"Haiti","Continent":"North America","Region":"Caribbean","SurfaceArea":"27750.00","IndepYear":"1804","Population":"8222000","LifeExpectancy":"49.2","GNP":"3459.00","GNPOld":"3107.00","LocalName":"Ha\u00efti\/Dayti","GovernmentForm":"Republic","HeadOfState":"Jean-Bertrand Aristide","Capital":"929","Code2":"HT"},{"Code":"HND","Name":"Honduras","Continent":"North America","Region":"Central America","SurfaceArea":"112088.00","IndepYear":"1838","Population":"6485000","LifeExpectancy":"69.9","GNP":"5333.00","GNPOld":"4697.00","LocalName":"Honduras","GovernmentForm":"Republic","HeadOfState":"Carlos Roberto Flores Facuss\u00e9","Capital":"933","Code2":"HN"},{"Code":"HKG","Name":"Hong Kong","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"1075.00","IndepYear":null,"Population":"6782000","LifeExpectancy":"79.5","GNP":"166448.00","GNPOld":"173610.00","LocalName":"Xianggang\/Hong Kong","GovernmentForm":"Special Administrative Region of China","HeadOfState":"Jiang Zemin","Capital":"937","Code2":"HK"},{"Code":"SJM","Name":"Svalbard and Jan Mayen","Continent":"Europe","Region":"Nordic Countries","SurfaceArea":"62422.00","IndepYear":null,"Population":"3200","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Svalbard og Jan Mayen","GovernmentForm":"Dependent Territory of Norway","HeadOfState":"Harald V","Capital":"938","Code2":"SJ"},{"Code":"IDN","Name":"Indonesia","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"1904569.00","IndepYear":"1945","Population":"212107000","LifeExpectancy":"68.0","GNP":"84982.00","GNPOld":"215002.00","LocalName":"Indonesia","GovernmentForm":"Republic","HeadOfState":"Abdurrahman Wahid","Capital":"939","Code2":"ID"},{"Code":"IND","Name":"India","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"3287263.00","IndepYear":"1947","Population":"1013662000","LifeExpectancy":"62.5","GNP":"447114.00","GNPOld":"430572.00","LocalName":"Bharat\/India","GovernmentForm":"Federal Republic","HeadOfState":"Kocheril Raman Narayanan","Capital":"1109","Code2":"IN"},{"Code":"IRQ","Name":"Iraq","Continent":"Asia","Region":"Middle East","SurfaceArea":"438317.00","IndepYear":"1932","Population":"23115000","LifeExpectancy":"66.5","GNP":"11500.00","GNPOld":null,"LocalName":"Al-\u00b4Iraq","GovernmentForm":"Republic","HeadOfState":"Saddam Hussein al-Takriti","Capital":"1365","Code2":"IQ"},{"Code":"IRN","Name":"Iran","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"1648195.00","IndepYear":"1906","Population":"67702000","LifeExpectancy":"69.7","GNP":"195746.00","GNPOld":"160151.00","LocalName":"Iran","GovernmentForm":"Islamic Republic","HeadOfState":"Ali Mohammad Khatami-Ardakani","Capital":"1380","Code2":"IR"},{"Code":"IRL","Name":"Ireland","Continent":"Europe","Region":"British Islands","SurfaceArea":"70273.00","IndepYear":"1921","Population":"3775100","LifeExpectancy":"76.8","GNP":"75921.00","GNPOld":"73132.00","LocalName":"Ireland\/\u00c9ire","GovernmentForm":"Republic","HeadOfState":"Mary McAleese","Capital":"1447","Code2":"IE"},{"Code":"ISL","Name":"Iceland","Continent":"Europe","Region":"Nordic Countries","SurfaceArea":"103000.00","IndepYear":"1944","Population":"279000","LifeExpectancy":"79.4","GNP":"8255.00","GNPOld":"7474.00","LocalName":"\u00cdsland","GovernmentForm":"Republic","HeadOfState":"\u00d3lafur Ragnar Gr\u00edmsson","Capital":"1449","Code2":"IS"},{"Code":"ISR","Name":"Israel","Continent":"Asia","Region":"Middle East","SurfaceArea":"21056.00","IndepYear":"1948","Population":"6217000","LifeExpectancy":"78.6","GNP":"97477.00","GNPOld":"98577.00","LocalName":"Yisra\u2019el\/Isra\u2019il","GovernmentForm":"Republic","HeadOfState":"Moshe Katzav","Capital":"1450","Code2":"IL"},{"Code":"ITA","Name":"Italy","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"301316.00","IndepYear":"1861","Population":"57680000","LifeExpectancy":"79.0","GNP":"1161755.00","GNPOld":"1145372.00","LocalName":"Italia","GovernmentForm":"Republic","HeadOfState":"Carlo Azeglio Ciampi","Capital":"1464","Code2":"IT"},{"Code":"TMP","Name":"East Timor","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"14874.00","IndepYear":null,"Population":"885000","LifeExpectancy":"46.0","GNP":"0.00","GNPOld":null,"LocalName":"Timor Timur","GovernmentForm":"Administrated by the UN","HeadOfState":"Jos\u00e9 Alexandre Gusm\u00e3o","Capital":"1522","Code2":"TP"},{"Code":"AUT","Name":"Austria","Continent":"Europe","Region":"Western Europe","SurfaceArea":"83859.00","IndepYear":"1918","Population":"8091800","LifeExpectancy":"77.7","GNP":"211860.00","GNPOld":"206025.00","LocalName":"\u00d6sterreich","GovernmentForm":"Federal Republic","HeadOfState":"Thomas Klestil","Capital":"1523","Code2":"AT"},{"Code":"JAM","Name":"Jamaica","Continent":"North America","Region":"Caribbean","SurfaceArea":"10990.00","IndepYear":"1962","Population":"2583000","LifeExpectancy":"75.2","GNP":"6871.00","GNPOld":"6722.00","LocalName":"Jamaica","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"1530","Code2":"JM"},{"Code":"JPN","Name":"Japan","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"377829.00","IndepYear":"-660","Population":"126714000","LifeExpectancy":"80.7","GNP":"3787042.00","GNPOld":"4192638.00","LocalName":"Nihon\/Nippon","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Akihito","Capital":"1532","Code2":"JP"},{"Code":"YEM","Name":"Yemen","Continent":"Asia","Region":"Middle East","SurfaceArea":"527968.00","IndepYear":"1918","Population":"18112000","LifeExpectancy":"59.8","GNP":"6041.00","GNPOld":"5729.00","LocalName":"Al-Yaman","GovernmentForm":"Republic","HeadOfState":"Ali Abdallah Salih","Capital":"1780","Code2":"YE"},{"Code":"JOR","Name":"Jordan","Continent":"Asia","Region":"Middle East","SurfaceArea":"88946.00","IndepYear":"1946","Population":"5083000","LifeExpectancy":"77.4","GNP":"7526.00","GNPOld":"7051.00","LocalName":"Al-Urdunn","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Abdullah II","Capital":"1786","Code2":"JO"},{"Code":"CXR","Name":"Christmas Island","Continent":"Oceania","Region":"Australia and New Zealand","SurfaceArea":"135.00","IndepYear":null,"Population":"2500","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Christmas Island","GovernmentForm":"Territory of Australia","HeadOfState":"Elisabeth II","Capital":"1791","Code2":"CX"},{"Code":"YUG","Name":"Yugoslavia","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"102173.00","IndepYear":"1918","Population":"10640000","LifeExpectancy":"72.4","GNP":"17000.00","GNPOld":null,"LocalName":"Jugoslavija","GovernmentForm":"Federal Republic","HeadOfState":"Vojislav Ko\u0161tunica","Capital":"1792","Code2":"YU"},{"Code":"KHM","Name":"Cambodia","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"181035.00","IndepYear":"1953","Population":"11168000","LifeExpectancy":"56.5","GNP":"5121.00","GNPOld":"5670.00","LocalName":"K\u00e2mpuch\u00e9a","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Norodom Sihanouk","Capital":"1800","Code2":"KH"},{"Code":"CMR","Name":"Cameroon","Continent":"Africa","Region":"Central Africa","SurfaceArea":"475442.00","IndepYear":"1960","Population":"15085000","LifeExpectancy":"54.8","GNP":"9174.00","GNPOld":"8596.00","LocalName":"Cameroun\/Cameroon","GovernmentForm":"Republic","HeadOfState":"Paul Biya","Capital":"1804","Code2":"CM"},{"Code":"CAN","Name":"Canada","Continent":"North America","Region":"North America","SurfaceArea":"9970610.00","IndepYear":"1867","Population":"31147000","LifeExpectancy":"79.4","GNP":"598862.00","GNPOld":"625626.00","LocalName":"Canada","GovernmentForm":"Constitutional Monarchy, Federation","HeadOfState":"Elisabeth II","Capital":"1822","Code2":"CA"},{"Code":"CPV","Name":"Cape Verde","Continent":"Africa","Region":"Western Africa","SurfaceArea":"4033.00","IndepYear":"1975","Population":"428000","LifeExpectancy":"68.9","GNP":"435.00","GNPOld":"420.00","LocalName":"Cabo Verde","GovernmentForm":"Republic","HeadOfState":"Ant\u00f3nio Mascarenhas Monteiro","Capital":"1859","Code2":"CV"},{"Code":"KAZ","Name":"Kazakstan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"2724900.00","IndepYear":"1991","Population":"16223000","LifeExpectancy":"63.2","GNP":"24375.00","GNPOld":"23383.00","LocalName":"Qazaqstan","GovernmentForm":"Republic","HeadOfState":"Nursultan Nazarbajev","Capital":"1864","Code2":"KZ"},{"Code":"KEN","Name":"Kenya","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"580367.00","IndepYear":"1963","Population":"30080000","LifeExpectancy":"48.0","GNP":"9217.00","GNPOld":"10241.00","LocalName":"Kenya","GovernmentForm":"Republic","HeadOfState":"Daniel arap Moi","Capital":"1881","Code2":"KE"},{"Code":"CAF","Name":"Central African Republic","Continent":"Africa","Region":"Central Africa","SurfaceArea":"622984.00","IndepYear":"1960","Population":"3615000","LifeExpectancy":"44.0","GNP":"1054.00","GNPOld":"993.00","LocalName":"Centrafrique\/B\u00ea-Afr\u00eeka","GovernmentForm":"Republic","HeadOfState":"Ange-F\u00e9lix Patass\u00e9","Capital":"1889","Code2":"CF"},{"Code":"CHN","Name":"China","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"9572900.00","IndepYear":"-1523","Population":"1277558000","LifeExpectancy":"71.4","GNP":"982268.00","GNPOld":"917719.00","LocalName":"Zhongquo","GovernmentForm":"People'sRepublic","HeadOfState":"Jiang Zemin","Capital":"1891","Code2":"CN"},{"Code":"KGZ","Name":"Kyrgyzstan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"199900.00","IndepYear":"1991","Population":"4699000","LifeExpectancy":"63.4","GNP":"1626.00","GNPOld":"1767.00","LocalName":"Kyrgyzstan","GovernmentForm":"Republic","HeadOfState":"Askar Akajev","Capital":"2253","Code2":"KG"},{"Code":"KIR","Name":"Kiribati","Continent":"Oceania","Region":"Micronesia","SurfaceArea":"726.00","IndepYear":"1979","Population":"83000","LifeExpectancy":"59.8","GNP":"40.70","GNPOld":null,"LocalName":"Kiribati","GovernmentForm":"Republic","HeadOfState":"Teburoro Tito","Capital":"2256","Code2":"KI"},{"Code":"COL","Name":"Colombia","Continent":"South America","Region":"South America","SurfaceArea":"1138914.00","IndepYear":"1810","Population":"42321000","LifeExpectancy":"70.3","GNP":"102896.00","GNPOld":"105116.00","LocalName":"Colombia","GovernmentForm":"Republic","HeadOfState":"Andr\u00e9s Pastrana Arango","Capital":"2257","Code2":"CO"},{"Code":"COM","Name":"Comoros","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"1862.00","IndepYear":"1975","Population":"578000","LifeExpectancy":"60.0","GNP":"4401.00","GNPOld":"4361.00","LocalName":"Komori\/Comores","GovernmentForm":"Republic","HeadOfState":"Azali Assoumani","Capital":"2295","Code2":"KM"},{"Code":"COG","Name":"Congo","Continent":"Africa","Region":"Central Africa","SurfaceArea":"342000.00","IndepYear":"1960","Population":"2943000","LifeExpectancy":"47.4","GNP":"2108.00","GNPOld":"2287.00","LocalName":"Congo","GovernmentForm":"Republic","HeadOfState":"Denis Sassou-Nguesso","Capital":"2296","Code2":"CG"},{"Code":"COD","Name":"Congo, The Democratic Republic of the","Continent":"Africa","Region":"Central Africa","SurfaceArea":"2344858.00","IndepYear":"1960","Population":"51654000","LifeExpectancy":"48.8","GNP":"6964.00","GNPOld":"2474.00","LocalName":"R\u00e9publique D\u00e9mocratique du Congo","GovernmentForm":"Republic","HeadOfState":"Joseph Kabila","Capital":"2298","Code2":"CD"},{"Code":"CCK","Name":"Cocos (Keeling) Islands","Continent":"Oceania","Region":"Australia and New Zealand","SurfaceArea":"14.00","IndepYear":null,"Population":"600","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Cocos (Keeling) Islands","GovernmentForm":"Territory of Australia","HeadOfState":"Elisabeth II","Capital":"2317","Code2":"CC"},{"Code":"PRK","Name":"North Korea","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"120538.00","IndepYear":"1948","Population":"24039000","LifeExpectancy":"70.7","GNP":"5332.00","GNPOld":null,"LocalName":"Choson Minjujuui In\u00b4min Konghwaguk (Bukhan)","GovernmentForm":"Socialistic Republic","HeadOfState":"Kim Jong-il","Capital":"2318","Code2":"KP"},{"Code":"KOR","Name":"South Korea","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"99434.00","IndepYear":"1948","Population":"46844000","LifeExpectancy":"74.4","GNP":"320749.00","GNPOld":"442544.00","LocalName":"Taehan Min\u2019guk (Namhan)","GovernmentForm":"Republic","HeadOfState":"Kim Dae-jung","Capital":"2331","Code2":"KR"},{"Code":"GRC","Name":"Greece","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"131626.00","IndepYear":"1830","Population":"10545700","LifeExpectancy":"78.4","GNP":"120724.00","GNPOld":"119946.00","LocalName":"Ell\u00e1da","GovernmentForm":"Republic","HeadOfState":"Kostis Stefanopoulos","Capital":"2401","Code2":"GR"},{"Code":"HRV","Name":"Croatia","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"56538.00","IndepYear":"1991","Population":"4473000","LifeExpectancy":"73.7","GNP":"20208.00","GNPOld":"19300.00","LocalName":"Hrvatska","GovernmentForm":"Republic","HeadOfState":"\u0160tipe Mesic","Capital":"2409","Code2":"HR"},{"Code":"CUB","Name":"Cuba","Continent":"North America","Region":"Caribbean","SurfaceArea":"110861.00","IndepYear":"1902","Population":"11201000","LifeExpectancy":"76.2","GNP":"17843.00","GNPOld":"18862.00","LocalName":"Cuba","GovernmentForm":"Socialistic Republic","HeadOfState":"Fidel Castro Ruz","Capital":"2413","Code2":"CU"},{"Code":"KWT","Name":"Kuwait","Continent":"Asia","Region":"Middle East","SurfaceArea":"17818.00","IndepYear":"1961","Population":"1972000","LifeExpectancy":"76.1","GNP":"27037.00","GNPOld":"30373.00","LocalName":"Al-Kuwayt","GovernmentForm":"Constitutional Monarchy (Emirate)","HeadOfState":"Jabir al-Ahmad al-Jabir al-Sabah","Capital":"2429","Code2":"KW"},{"Code":"CYP","Name":"Cyprus","Continent":"Asia","Region":"Middle East","SurfaceArea":"9251.00","IndepYear":"1960","Population":"754700","LifeExpectancy":"76.7","GNP":"9333.00","GNPOld":"8246.00","LocalName":"K\u00fdpros\/Kibris","GovernmentForm":"Republic","HeadOfState":"Glafkos Klerides","Capital":"2430","Code2":"CY"},{"Code":"LAO","Name":"Laos","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"236800.00","IndepYear":"1953","Population":"5433000","LifeExpectancy":"53.1","GNP":"1292.00","GNPOld":"1746.00","LocalName":"Lao","GovernmentForm":"Republic","HeadOfState":"Khamtay Siphandone","Capital":"2432","Code2":"LA"},{"Code":"LVA","Name":"Latvia","Continent":"Europe","Region":"Baltic Countries","SurfaceArea":"64589.00","IndepYear":"1991","Population":"2424200","LifeExpectancy":"68.4","GNP":"6398.00","GNPOld":"5639.00","LocalName":"Latvija","GovernmentForm":"Republic","HeadOfState":"Vaira Vike-Freiberga","Capital":"2434","Code2":"LV"},{"Code":"LSO","Name":"Lesotho","Continent":"Africa","Region":"Southern Africa","SurfaceArea":"30355.00","IndepYear":"1966","Population":"2153000","LifeExpectancy":"50.8","GNP":"1061.00","GNPOld":"1161.00","LocalName":"Lesotho","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Letsie III","Capital":"2437","Code2":"LS"},{"Code":"LBN","Name":"Lebanon","Continent":"Asia","Region":"Middle East","SurfaceArea":"10400.00","IndepYear":"1941","Population":"3282000","LifeExpectancy":"71.3","GNP":"17121.00","GNPOld":"15129.00","LocalName":"Lubnan","GovernmentForm":"Republic","HeadOfState":"\u00c9mile Lahoud","Capital":"2438","Code2":"LB"},{"Code":"LBR","Name":"Liberia","Continent":"Africa","Region":"Western Africa","SurfaceArea":"111369.00","IndepYear":"1847","Population":"3154000","LifeExpectancy":"51.0","GNP":"2012.00","GNPOld":null,"LocalName":"Liberia","GovernmentForm":"Republic","HeadOfState":"Charles Taylor","Capital":"2440","Code2":"LR"},{"Code":"LBY","Name":"Libyan Arab Jamahiriya","Continent":"Africa","Region":"Northern Africa","SurfaceArea":"1759540.00","IndepYear":"1951","Population":"5605000","LifeExpectancy":"75.5","GNP":"44806.00","GNPOld":"40562.00","LocalName":"Libiya","GovernmentForm":"Socialistic State","HeadOfState":"Muammar al-Qadhafi","Capital":"2441","Code2":"LY"},{"Code":"LIE","Name":"Liechtenstein","Continent":"Europe","Region":"Western Europe","SurfaceArea":"160.00","IndepYear":"1806","Population":"32300","LifeExpectancy":"78.8","GNP":"1119.00","GNPOld":"1084.00","LocalName":"Liechtenstein","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Hans-Adam II","Capital":"2446","Code2":"LI"},{"Code":"LTU","Name":"Lithuania","Continent":"Europe","Region":"Baltic Countries","SurfaceArea":"65301.00","IndepYear":"1991","Population":"3698500","LifeExpectancy":"69.1","GNP":"10692.00","GNPOld":"9585.00","LocalName":"Lietuva","GovernmentForm":"Republic","HeadOfState":"Valdas Adamkus","Capital":"2447","Code2":"LT"},{"Code":"LUX","Name":"Luxembourg","Continent":"Europe","Region":"Western Europe","SurfaceArea":"2586.00","IndepYear":"1867","Population":"435700","LifeExpectancy":"77.1","GNP":"16321.00","GNPOld":"15519.00","LocalName":"Luxembourg\/L\u00ebtzebuerg","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Henri","Capital":"2452","Code2":"LU"},{"Code":"ESH","Name":"Western Sahara","Continent":"Africa","Region":"Northern Africa","SurfaceArea":"266000.00","IndepYear":null,"Population":"293000","LifeExpectancy":"49.8","GNP":"60.00","GNPOld":null,"LocalName":"As-Sahrawiya","GovernmentForm":"Occupied by Marocco","HeadOfState":"Mohammed Abdel Aziz","Capital":"2453","Code2":"EH"},{"Code":"MAC","Name":"Macao","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"18.00","IndepYear":null,"Population":"473000","LifeExpectancy":"81.6","GNP":"5749.00","GNPOld":"5940.00","LocalName":"Macau\/Aomen","GovernmentForm":"Special Administrative Region of China","HeadOfState":"Jiang Zemin","Capital":"2454","Code2":"MO"},{"Code":"MDG","Name":"Madagascar","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"587041.00","IndepYear":"1960","Population":"15942000","LifeExpectancy":"55.0","GNP":"3750.00","GNPOld":"3545.00","LocalName":"Madagasikara\/Madagascar","GovernmentForm":"Federal Republic","HeadOfState":"Didier Ratsiraka","Capital":"2455","Code2":"MG"},{"Code":"MKD","Name":"Macedonia","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"25713.00","IndepYear":"1991","Population":"2024000","LifeExpectancy":"73.8","GNP":"1694.00","GNPOld":"1915.00","LocalName":"Makedonija","GovernmentForm":"Republic","HeadOfState":"Boris Trajkovski","Capital":"2460","Code2":"MK"},{"Code":"MWI","Name":"Malawi","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"118484.00","IndepYear":"1964","Population":"10925000","LifeExpectancy":"37.6","GNP":"1687.00","GNPOld":"2527.00","LocalName":"Malawi","GovernmentForm":"Republic","HeadOfState":"Bakili Muluzi","Capital":"2462","Code2":"MW"},{"Code":"MDV","Name":"Maldives","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"298.00","IndepYear":"1965","Population":"286000","LifeExpectancy":"62.2","GNP":"199.00","GNPOld":null,"LocalName":"Dhivehi Raajje\/Maldives","GovernmentForm":"Republic","HeadOfState":"Maumoon Abdul Gayoom","Capital":"2463","Code2":"MV"},{"Code":"MYS","Name":"Malaysia","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"329758.00","IndepYear":"1957","Population":"22244000","LifeExpectancy":"70.8","GNP":"69213.00","GNPOld":"97884.00","LocalName":"Malaysia","GovernmentForm":"Constitutional Monarchy, Federation","HeadOfState":"Salahuddin Abdul Aziz Shah Alhaj","Capital":"2464","Code2":"MY"},{"Code":"MLI","Name":"Mali","Continent":"Africa","Region":"Western Africa","SurfaceArea":"1240192.00","IndepYear":"1960","Population":"11234000","LifeExpectancy":"46.7","GNP":"2642.00","GNPOld":"2453.00","LocalName":"Mali","GovernmentForm":"Republic","HeadOfState":"Alpha Oumar Konar\u00e9","Capital":"2482","Code2":"ML"},{"Code":"MLT","Name":"Malta","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"316.00","IndepYear":"1964","Population":"380200","LifeExpectancy":"77.9","GNP":"3512.00","GNPOld":"3338.00","LocalName":"Malta","GovernmentForm":"Republic","HeadOfState":"Guido de Marco","Capital":"2484","Code2":"MT"},{"Code":"MAR","Name":"Morocco","Continent":"Africa","Region":"Northern Africa","SurfaceArea":"446550.00","IndepYear":"1956","Population":"28351000","LifeExpectancy":"69.1","GNP":"36124.00","GNPOld":"33514.00","LocalName":"Al-Maghrib","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Mohammed VI","Capital":"2486","Code2":"MA"},{"Code":"MHL","Name":"Marshall Islands","Continent":"Oceania","Region":"Micronesia","SurfaceArea":"181.00","IndepYear":"1990","Population":"64000","LifeExpectancy":"65.5","GNP":"97.00","GNPOld":null,"LocalName":"Marshall Islands\/Majol","GovernmentForm":"Republic","HeadOfState":"Kessai Note","Capital":"2507","Code2":"MH"},{"Code":"MTQ","Name":"Martinique","Continent":"North America","Region":"Caribbean","SurfaceArea":"1102.00","IndepYear":null,"Population":"395000","LifeExpectancy":"78.3","GNP":"2731.00","GNPOld":"2559.00","LocalName":"Martinique","GovernmentForm":"Overseas Department of France","HeadOfState":"Jacques Chirac","Capital":"2508","Code2":"MQ"},{"Code":"MRT","Name":"Mauritania","Continent":"Africa","Region":"Western Africa","SurfaceArea":"1025520.00","IndepYear":"1960","Population":"2670000","LifeExpectancy":"50.8","GNP":"998.00","GNPOld":"1081.00","LocalName":"Muritaniya\/Mauritanie","GovernmentForm":"Republic","HeadOfState":"Maaouiya Ould Sid\u00b4Ahmad Taya","Capital":"2509","Code2":"MR"},{"Code":"MUS","Name":"Mauritius","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"2040.00","IndepYear":"1968","Population":"1158000","LifeExpectancy":"71.0","GNP":"4251.00","GNPOld":"4186.00","LocalName":"Mauritius","GovernmentForm":"Republic","HeadOfState":"Cassam Uteem","Capital":"2511","Code2":"MU"},{"Code":"MYT","Name":"Mayotte","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"373.00","IndepYear":null,"Population":"149000","LifeExpectancy":"59.5","GNP":"0.00","GNPOld":null,"LocalName":"Mayotte","GovernmentForm":"Territorial Collectivity of France","HeadOfState":"Jacques Chirac","Capital":"2514","Code2":"YT"},{"Code":"MEX","Name":"Mexico","Continent":"North America","Region":"Central America","SurfaceArea":"1958201.00","IndepYear":"1810","Population":"98881000","LifeExpectancy":"71.5","GNP":"414972.00","GNPOld":"401461.00","LocalName":"M\u00e9xico","GovernmentForm":"Federal Republic","HeadOfState":"Vicente Fox Quesada","Capital":"2515","Code2":"MX"},{"Code":"FSM","Name":"Micronesia, Federated States of","Continent":"Oceania","Region":"Micronesia","SurfaceArea":"702.00","IndepYear":"1990","Population":"119000","LifeExpectancy":"68.6","GNP":"212.00","GNPOld":null,"LocalName":"Micronesia","GovernmentForm":"Federal Republic","HeadOfState":"Leo A. Falcam","Capital":"2689","Code2":"FM"},{"Code":"MDA","Name":"Moldova","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"33851.00","IndepYear":"1991","Population":"4380000","LifeExpectancy":"64.5","GNP":"1579.00","GNPOld":"1872.00","LocalName":"Moldova","GovernmentForm":"Republic","HeadOfState":"Vladimir Voronin","Capital":"2690","Code2":"MD"},{"Code":"MCO","Name":"Monaco","Continent":"Europe","Region":"Western Europe","SurfaceArea":"1.50","IndepYear":"1861","Population":"34000","LifeExpectancy":"78.8","GNP":"776.00","GNPOld":null,"LocalName":"Monaco","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Rainier III","Capital":"2695","Code2":"MC"},{"Code":"MNG","Name":"Mongolia","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"1566500.00","IndepYear":"1921","Population":"2662000","LifeExpectancy":"67.3","GNP":"1043.00","GNPOld":"933.00","LocalName":"Mongol Uls","GovernmentForm":"Republic","HeadOfState":"Natsagiin Bagabandi","Capital":"2696","Code2":"MN"},{"Code":"MSR","Name":"Montserrat","Continent":"North America","Region":"Caribbean","SurfaceArea":"102.00","IndepYear":null,"Population":"11000","LifeExpectancy":"78.0","GNP":"109.00","GNPOld":null,"LocalName":"Montserrat","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"2697","Code2":"MS"},{"Code":"MOZ","Name":"Mozambique","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"801590.00","IndepYear":"1975","Population":"19680000","LifeExpectancy":"37.5","GNP":"2891.00","GNPOld":"2711.00","LocalName":"Mo\u00e7ambique","GovernmentForm":"Republic","HeadOfState":"Joaqu\u00edm A. Chissano","Capital":"2698","Code2":"MZ"},{"Code":"MMR","Name":"Myanmar","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"676578.00","IndepYear":"1948","Population":"45611000","LifeExpectancy":"54.9","GNP":"180375.00","GNPOld":"171028.00","LocalName":"Myanma Pye","GovernmentForm":"Republic","HeadOfState":"kenraali Than Shwe","Capital":"2710","Code2":"MM"},{"Code":"NAM","Name":"Namibia","Continent":"Africa","Region":"Southern Africa","SurfaceArea":"824292.00","IndepYear":"1990","Population":"1726000","LifeExpectancy":"42.5","GNP":"3101.00","GNPOld":"3384.00","LocalName":"Namibia","GovernmentForm":"Republic","HeadOfState":"Sam Nujoma","Capital":"2726","Code2":"NA"},{"Code":"NRU","Name":"Nauru","Continent":"Oceania","Region":"Micronesia","SurfaceArea":"21.00","IndepYear":"1968","Population":"12000","LifeExpectancy":"60.8","GNP":"197.00","GNPOld":null,"LocalName":"Naoero\/Nauru","GovernmentForm":"Republic","HeadOfState":"Bernard Dowiyogo","Capital":"2728","Code2":"NR"},{"Code":"NPL","Name":"Nepal","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"147181.00","IndepYear":"1769","Population":"23930000","LifeExpectancy":"57.8","GNP":"4768.00","GNPOld":"4837.00","LocalName":"Nepal","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Gyanendra Bir Bikram","Capital":"2729","Code2":"NP"},{"Code":"NIC","Name":"Nicaragua","Continent":"North America","Region":"Central America","SurfaceArea":"130000.00","IndepYear":"1838","Population":"5074000","LifeExpectancy":"68.7","GNP":"1988.00","GNPOld":"2023.00","LocalName":"Nicaragua","GovernmentForm":"Republic","HeadOfState":"Arnoldo Alem\u00e1n Lacayo","Capital":"2734","Code2":"NI"},{"Code":"NER","Name":"Niger","Continent":"Africa","Region":"Western Africa","SurfaceArea":"1267000.00","IndepYear":"1960","Population":"10730000","LifeExpectancy":"41.3","GNP":"1706.00","GNPOld":"1580.00","LocalName":"Niger","GovernmentForm":"Republic","HeadOfState":"Mamadou Tandja","Capital":"2738","Code2":"NE"},{"Code":"NGA","Name":"Nigeria","Continent":"Africa","Region":"Western Africa","SurfaceArea":"923768.00","IndepYear":"1960","Population":"111506000","LifeExpectancy":"51.6","GNP":"65707.00","GNPOld":"58623.00","LocalName":"Nigeria","GovernmentForm":"Federal Republic","HeadOfState":"Olusegun Obasanjo","Capital":"2754","Code2":"NG"},{"Code":"NIU","Name":"Niue","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"260.00","IndepYear":null,"Population":"2000","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Niue","GovernmentForm":"Nonmetropolitan Territory of New Zealand","HeadOfState":"Elisabeth II","Capital":"2805","Code2":"NU"},{"Code":"NFK","Name":"Norfolk Island","Continent":"Oceania","Region":"Australia and New Zealand","SurfaceArea":"36.00","IndepYear":null,"Population":"2000","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Norfolk Island","GovernmentForm":"Territory of Australia","HeadOfState":"Elisabeth II","Capital":"2806","Code2":"NF"},{"Code":"NOR","Name":"Norway","Continent":"Europe","Region":"Nordic Countries","SurfaceArea":"323877.00","IndepYear":"1905","Population":"4478500","LifeExpectancy":"78.7","GNP":"145895.00","GNPOld":"153370.00","LocalName":"Norge","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Harald V","Capital":"2807","Code2":"NO"},{"Code":"CIV","Name":"C\u00f4te d\u2019Ivoire","Continent":"Africa","Region":"Western Africa","SurfaceArea":"322463.00","IndepYear":"1960","Population":"14786000","LifeExpectancy":"45.2","GNP":"11345.00","GNPOld":"10285.00","LocalName":"C\u00f4te d\u2019Ivoire","GovernmentForm":"Republic","HeadOfState":"Laurent Gbagbo","Capital":"2814","Code2":"CI"},{"Code":"OMN","Name":"Oman","Continent":"Asia","Region":"Middle East","SurfaceArea":"309500.00","IndepYear":"1951","Population":"2542000","LifeExpectancy":"71.8","GNP":"16904.00","GNPOld":"16153.00","LocalName":"\u00b4Uman","GovernmentForm":"Monarchy (Sultanate)","HeadOfState":"Qabus ibn Sa\u00b4id","Capital":"2821","Code2":"OM"},{"Code":"PAK","Name":"Pakistan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"796095.00","IndepYear":"1947","Population":"156483000","LifeExpectancy":"61.1","GNP":"61289.00","GNPOld":"58549.00","LocalName":"Pakistan","GovernmentForm":"Republic","HeadOfState":"Mohammad Rafiq Tarar","Capital":"2831","Code2":"PK"},{"Code":"PLW","Name":"Palau","Continent":"Oceania","Region":"Micronesia","SurfaceArea":"459.00","IndepYear":"1994","Population":"19000","LifeExpectancy":"68.6","GNP":"105.00","GNPOld":null,"LocalName":"Belau\/Palau","GovernmentForm":"Republic","HeadOfState":"Kuniwo Nakamura","Capital":"2881","Code2":"PW"},{"Code":"PAN","Name":"Panama","Continent":"North America","Region":"Central America","SurfaceArea":"75517.00","IndepYear":"1903","Population":"2856000","LifeExpectancy":"75.5","GNP":"9131.00","GNPOld":"8700.00","LocalName":"Panam\u00e1","GovernmentForm":"Republic","HeadOfState":"Mireya Elisa Moscoso Rodr\u00edguez","Capital":"2882","Code2":"PA"},{"Code":"PNG","Name":"Papua New Guinea","Continent":"Oceania","Region":"Melanesia","SurfaceArea":"462840.00","IndepYear":"1975","Population":"4807000","LifeExpectancy":"63.1","GNP":"4988.00","GNPOld":"6328.00","LocalName":"Papua New Guinea\/Papua Niugini","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"2884","Code2":"PG"},{"Code":"PRY","Name":"Paraguay","Continent":"South America","Region":"South America","SurfaceArea":"406752.00","IndepYear":"1811","Population":"5496000","LifeExpectancy":"73.7","GNP":"8444.00","GNPOld":"9555.00","LocalName":"Paraguay","GovernmentForm":"Republic","HeadOfState":"Luis \u00c1ngel Gonz\u00e1lez Macchi","Capital":"2885","Code2":"PY"},{"Code":"PER","Name":"Peru","Continent":"South America","Region":"South America","SurfaceArea":"1285216.00","IndepYear":"1821","Population":"25662000","LifeExpectancy":"70.0","GNP":"64140.00","GNPOld":"65186.00","LocalName":"Per\u00fa\/Piruw","GovernmentForm":"Republic","HeadOfState":"Valentin Paniagua Corazao","Capital":"2890","Code2":"PE"},{"Code":"PCN","Name":"Pitcairn","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"49.00","IndepYear":null,"Population":"50","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Pitcairn","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"2912","Code2":"PN"},{"Code":"MNP","Name":"Northern Mariana Islands","Continent":"Oceania","Region":"Micronesia","SurfaceArea":"464.00","IndepYear":null,"Population":"78000","LifeExpectancy":"75.5","GNP":"0.00","GNPOld":null,"LocalName":"Northern Mariana Islands","GovernmentForm":"Commonwealth of the US","HeadOfState":"George W. Bush","Capital":"2913","Code2":"MP"},{"Code":"PRT","Name":"Portugal","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"91982.00","IndepYear":"1143","Population":"9997600","LifeExpectancy":"75.8","GNP":"105954.00","GNPOld":"102133.00","LocalName":"Portugal","GovernmentForm":"Republic","HeadOfState":"Jorge Samp\u00e3io","Capital":"2914","Code2":"PT"},{"Code":"PRI","Name":"Puerto Rico","Continent":"North America","Region":"Caribbean","SurfaceArea":"8875.00","IndepYear":null,"Population":"3869000","LifeExpectancy":"75.6","GNP":"34100.00","GNPOld":"32100.00","LocalName":"Puerto Rico","GovernmentForm":"Commonwealth of the US","HeadOfState":"George W. Bush","Capital":"2919","Code2":"PR"},{"Code":"POL","Name":"Poland","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"323250.00","IndepYear":"1918","Population":"38653600","LifeExpectancy":"73.2","GNP":"151697.00","GNPOld":"135636.00","LocalName":"Polska","GovernmentForm":"Republic","HeadOfState":"Aleksander Kwasniewski","Capital":"2928","Code2":"PL"},{"Code":"GNQ","Name":"Equatorial Guinea","Continent":"Africa","Region":"Central Africa","SurfaceArea":"28051.00","IndepYear":"1968","Population":"453000","LifeExpectancy":"53.6","GNP":"283.00","GNPOld":"542.00","LocalName":"Guinea Ecuatorial","GovernmentForm":"Republic","HeadOfState":"Teodoro Obiang Nguema Mbasogo","Capital":"2972","Code2":"GQ"},{"Code":"QAT","Name":"Qatar","Continent":"Asia","Region":"Middle East","SurfaceArea":"11000.00","IndepYear":"1971","Population":"599000","LifeExpectancy":"72.4","GNP":"9472.00","GNPOld":"8920.00","LocalName":"Qatar","GovernmentForm":"Monarchy","HeadOfState":"Hamad ibn Khalifa al-Thani","Capital":"2973","Code2":"QA"},{"Code":"FRA","Name":"France","Continent":"Europe","Region":"Western Europe","SurfaceArea":"551500.00","IndepYear":"843","Population":"59225700","LifeExpectancy":"78.8","GNP":"1424285.00","GNPOld":"1392448.00","LocalName":"France","GovernmentForm":"Republic","HeadOfState":"Jacques Chirac","Capital":"2974","Code2":"FR"},{"Code":"GUF","Name":"French Guiana","Continent":"South America","Region":"South America","SurfaceArea":"90000.00","IndepYear":null,"Population":"181000","LifeExpectancy":"76.1","GNP":"681.00","GNPOld":null,"LocalName":"Guyane fran\u00e7aise","GovernmentForm":"Overseas Department of France","HeadOfState":"Jacques Chirac","Capital":"3014","Code2":"GF"},{"Code":"PYF","Name":"French Polynesia","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"4000.00","IndepYear":null,"Population":"235000","LifeExpectancy":"74.8","GNP":"818.00","GNPOld":"781.00","LocalName":"Polyn\u00e9sie fran\u00e7aise","GovernmentForm":"Nonmetropolitan Territory of France","HeadOfState":"Jacques Chirac","Capital":"3016","Code2":"PF"},{"Code":"REU","Name":"R\u00e9union","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"2510.00","IndepYear":null,"Population":"699000","LifeExpectancy":"72.7","GNP":"8287.00","GNPOld":"7988.00","LocalName":"R\u00e9union","GovernmentForm":"Overseas Department of France","HeadOfState":"Jacques Chirac","Capital":"3017","Code2":"RE"},{"Code":"ROM","Name":"Romania","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"238391.00","IndepYear":"1878","Population":"22455500","LifeExpectancy":"69.9","GNP":"38158.00","GNPOld":"34843.00","LocalName":"Rom\u00e2nia","GovernmentForm":"Republic","HeadOfState":"Ion Iliescu","Capital":"3018","Code2":"RO"},{"Code":"RWA","Name":"Rwanda","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"26338.00","IndepYear":"1962","Population":"7733000","LifeExpectancy":"39.3","GNP":"2036.00","GNPOld":"1863.00","LocalName":"Rwanda\/Urwanda","GovernmentForm":"Republic","HeadOfState":"Paul Kagame","Capital":"3047","Code2":"RW"},{"Code":"SWE","Name":"Sweden","Continent":"Europe","Region":"Nordic Countries","SurfaceArea":"449964.00","IndepYear":"836","Population":"8861400","LifeExpectancy":"79.6","GNP":"226492.00","GNPOld":"227757.00","LocalName":"Sverige","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Carl XVI Gustaf","Capital":"3048","Code2":"SE"},{"Code":"SHN","Name":"Saint Helena","Continent":"Africa","Region":"Western Africa","SurfaceArea":"314.00","IndepYear":null,"Population":"6000","LifeExpectancy":"76.8","GNP":"0.00","GNPOld":null,"LocalName":"Saint Helena","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"3063","Code2":"SH"},{"Code":"KNA","Name":"Saint Kitts and Nevis","Continent":"North America","Region":"Caribbean","SurfaceArea":"261.00","IndepYear":"1983","Population":"38000","LifeExpectancy":"70.7","GNP":"299.00","GNPOld":null,"LocalName":"Saint Kitts and Nevis","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"3064","Code2":"KN"},{"Code":"LCA","Name":"Saint Lucia","Continent":"North America","Region":"Caribbean","SurfaceArea":"622.00","IndepYear":"1979","Population":"154000","LifeExpectancy":"72.3","GNP":"571.00","GNPOld":null,"LocalName":"Saint Lucia","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"3065","Code2":"LC"},{"Code":"VCT","Name":"Saint Vincent and the Grenadines","Continent":"North America","Region":"Caribbean","SurfaceArea":"388.00","IndepYear":"1979","Population":"114000","LifeExpectancy":"72.3","GNP":"285.00","GNPOld":null,"LocalName":"Saint Vincent and the Grenadines","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"3066","Code2":"VC"},{"Code":"SPM","Name":"Saint Pierre and Miquelon","Continent":"North America","Region":"North America","SurfaceArea":"242.00","IndepYear":null,"Population":"7000","LifeExpectancy":"77.6","GNP":"0.00","GNPOld":null,"LocalName":"Saint-Pierre-et-Miquelon","GovernmentForm":"Territorial Collectivity of France","HeadOfState":"Jacques Chirac","Capital":"3067","Code2":"PM"},{"Code":"DEU","Name":"Germany","Continent":"Europe","Region":"Western Europe","SurfaceArea":"357022.00","IndepYear":"1955","Population":"82164700","LifeExpectancy":"77.4","GNP":"2133367.00","GNPOld":"2102826.00","LocalName":"Deutschland","GovernmentForm":"Federal Republic","HeadOfState":"Johannes Rau","Capital":"3068","Code2":"DE"},{"Code":"SLB","Name":"Solomon Islands","Continent":"Oceania","Region":"Melanesia","SurfaceArea":"28896.00","IndepYear":"1978","Population":"444000","LifeExpectancy":"71.3","GNP":"182.00","GNPOld":"220.00","LocalName":"Solomon Islands","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"3161","Code2":"SB"},{"Code":"ZMB","Name":"Zambia","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"752618.00","IndepYear":"1964","Population":"9169000","LifeExpectancy":"37.2","GNP":"3377.00","GNPOld":"3922.00","LocalName":"Zambia","GovernmentForm":"Republic","HeadOfState":"Frederick Chiluba","Capital":"3162","Code2":"ZM"},{"Code":"WSM","Name":"Samoa","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"2831.00","IndepYear":"1962","Population":"180000","LifeExpectancy":"69.2","GNP":"141.00","GNPOld":"157.00","LocalName":"Samoa","GovernmentForm":"Parlementary Monarchy","HeadOfState":"Malietoa Tanumafili II","Capital":"3169","Code2":"WS"},{"Code":"SMR","Name":"San Marino","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"61.00","IndepYear":"885","Population":"27000","LifeExpectancy":"81.1","GNP":"510.00","GNPOld":null,"LocalName":"San Marino","GovernmentForm":"Republic","HeadOfState":null,"Capital":"3171","Code2":"SM"},{"Code":"STP","Name":"Sao Tome and Principe","Continent":"Africa","Region":"Central Africa","SurfaceArea":"964.00","IndepYear":"1975","Population":"147000","LifeExpectancy":"65.3","GNP":"6.00","GNPOld":null,"LocalName":"S\u00e3o Tom\u00e9 e Pr\u00edncipe","GovernmentForm":"Republic","HeadOfState":"Miguel Trovoada","Capital":"3172","Code2":"ST"},{"Code":"SAU","Name":"Saudi Arabia","Continent":"Asia","Region":"Middle East","SurfaceArea":"2149690.00","IndepYear":"1932","Population":"21607000","LifeExpectancy":"67.8","GNP":"137635.00","GNPOld":"146171.00","LocalName":"Al-\u00b4Arabiya as-Sa\u00b4udiya","GovernmentForm":"Monarchy","HeadOfState":"Fahd ibn Abdul-Aziz al-Sa\u00b4ud","Capital":"3173","Code2":"SA"},{"Code":"SEN","Name":"Senegal","Continent":"Africa","Region":"Western Africa","SurfaceArea":"196722.00","IndepYear":"1960","Population":"9481000","LifeExpectancy":"62.2","GNP":"4787.00","GNPOld":"4542.00","LocalName":"S\u00e9n\u00e9gal\/Sounougal","GovernmentForm":"Republic","HeadOfState":"Abdoulaye Wade","Capital":"3198","Code2":"SN"},{"Code":"SYC","Name":"Seychelles","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"455.00","IndepYear":"1976","Population":"77000","LifeExpectancy":"70.4","GNP":"536.00","GNPOld":"539.00","LocalName":"Sesel\/Seychelles","GovernmentForm":"Republic","HeadOfState":"France-Albert Ren\u00e9","Capital":"3206","Code2":"SC"},{"Code":"SLE","Name":"Sierra Leone","Continent":"Africa","Region":"Western Africa","SurfaceArea":"71740.00","IndepYear":"1961","Population":"4854000","LifeExpectancy":"45.3","GNP":"746.00","GNPOld":"858.00","LocalName":"Sierra Leone","GovernmentForm":"Republic","HeadOfState":"Ahmed Tejan Kabbah","Capital":"3207","Code2":"SL"},{"Code":"SGP","Name":"Singapore","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"618.00","IndepYear":"1965","Population":"3567000","LifeExpectancy":"80.1","GNP":"86503.00","GNPOld":"96318.00","LocalName":"Singapore\/Singapura\/Xinjiapo\/Singapur","GovernmentForm":"Republic","HeadOfState":"Sellapan Rama Nathan","Capital":"3208","Code2":"SG"},{"Code":"SVK","Name":"Slovakia","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"49012.00","IndepYear":"1993","Population":"5398700","LifeExpectancy":"73.7","GNP":"20594.00","GNPOld":"19452.00","LocalName":"Slovensko","GovernmentForm":"Republic","HeadOfState":"Rudolf Schuster","Capital":"3209","Code2":"SK"},{"Code":"SVN","Name":"Slovenia","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"20256.00","IndepYear":"1991","Population":"1987800","LifeExpectancy":"74.9","GNP":"19756.00","GNPOld":"18202.00","LocalName":"Slovenija","GovernmentForm":"Republic","HeadOfState":"Milan Kucan","Capital":"3212","Code2":"SI"},{"Code":"SOM","Name":"Somalia","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"637657.00","IndepYear":"1960","Population":"10097000","LifeExpectancy":"46.2","GNP":"935.00","GNPOld":null,"LocalName":"Soomaaliya","GovernmentForm":"Republic","HeadOfState":"Abdiqassim Salad Hassan","Capital":"3214","Code2":"SO"},{"Code":"LKA","Name":"Sri Lanka","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"65610.00","IndepYear":"1948","Population":"18827000","LifeExpectancy":"71.8","GNP":"15706.00","GNPOld":"15091.00","LocalName":"Sri Lanka\/Ilankai","GovernmentForm":"Republic","HeadOfState":"Chandrika Kumaratunga","Capital":"3217","Code2":"LK"},{"Code":"SDN","Name":"Sudan","Continent":"Africa","Region":"Northern Africa","SurfaceArea":"2505813.00","IndepYear":"1956","Population":"29490000","LifeExpectancy":"56.6","GNP":"10162.00","GNPOld":null,"LocalName":"As-Sudan","GovernmentForm":"Islamic Republic","HeadOfState":"Omar Hassan Ahmad al-Bashir","Capital":"3225","Code2":"SD"},{"Code":"FIN","Name":"Finland","Continent":"Europe","Region":"Nordic Countries","SurfaceArea":"338145.00","IndepYear":"1917","Population":"5171300","LifeExpectancy":"77.4","GNP":"121914.00","GNPOld":"119833.00","LocalName":"Suomi","GovernmentForm":"Republic","HeadOfState":"Tarja Halonen","Capital":"3236","Code2":"FI"},{"Code":"SUR","Name":"Suriname","Continent":"South America","Region":"South America","SurfaceArea":"163265.00","IndepYear":"1975","Population":"417000","LifeExpectancy":"71.4","GNP":"870.00","GNPOld":"706.00","LocalName":"Suriname","GovernmentForm":"Republic","HeadOfState":"Ronald Venetiaan","Capital":"3243","Code2":"SR"},{"Code":"SWZ","Name":"Swaziland","Continent":"Africa","Region":"Southern Africa","SurfaceArea":"17364.00","IndepYear":"1968","Population":"1008000","LifeExpectancy":"40.4","GNP":"1206.00","GNPOld":"1312.00","LocalName":"kaNgwane","GovernmentForm":"Monarchy","HeadOfState":"Mswati III","Capital":"3244","Code2":"SZ"},{"Code":"CHE","Name":"Switzerland","Continent":"Europe","Region":"Western Europe","SurfaceArea":"41284.00","IndepYear":"1499","Population":"7160400","LifeExpectancy":"79.6","GNP":"264478.00","GNPOld":"256092.00","LocalName":"Schweiz\/Suisse\/Svizzera\/Svizra","GovernmentForm":"Federation","HeadOfState":"Adolf Ogi","Capital":"3248","Code2":"CH"},{"Code":"SYR","Name":"Syria","Continent":"Asia","Region":"Middle East","SurfaceArea":"185180.00","IndepYear":"1941","Population":"16125000","LifeExpectancy":"68.5","GNP":"65984.00","GNPOld":"64926.00","LocalName":"Suriya","GovernmentForm":"Republic","HeadOfState":"Bashar al-Assad","Capital":"3250","Code2":"SY"},{"Code":"TJK","Name":"Tajikistan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"143100.00","IndepYear":"1991","Population":"6188000","LifeExpectancy":"64.1","GNP":"1990.00","GNPOld":"1056.00","LocalName":"To\u00e7ikiston","GovernmentForm":"Republic","HeadOfState":"Emomali Rahmonov","Capital":"3261","Code2":"TJ"},{"Code":"TWN","Name":"Taiwan","Continent":"Asia","Region":"Eastern Asia","SurfaceArea":"36188.00","IndepYear":"1945","Population":"22256000","LifeExpectancy":"76.4","GNP":"256254.00","GNPOld":"263451.00","LocalName":"T\u2019ai-wan","GovernmentForm":"Republic","HeadOfState":"Chen Shui-bian","Capital":"3263","Code2":"TW"},{"Code":"TZA","Name":"Tanzania","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"883749.00","IndepYear":"1961","Population":"33517000","LifeExpectancy":"52.3","GNP":"8005.00","GNPOld":"7388.00","LocalName":"Tanzania","GovernmentForm":"Republic","HeadOfState":"Benjamin William Mkapa","Capital":"3306","Code2":"TZ"},{"Code":"DNK","Name":"Denmark","Continent":"Europe","Region":"Nordic Countries","SurfaceArea":"43094.00","IndepYear":"800","Population":"5330000","LifeExpectancy":"76.5","GNP":"174099.00","GNPOld":"169264.00","LocalName":"Danmark","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Margrethe II","Capital":"3315","Code2":"DK"},{"Code":"THA","Name":"Thailand","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"513115.00","IndepYear":"1350","Population":"61399000","LifeExpectancy":"68.6","GNP":"116416.00","GNPOld":"153907.00","LocalName":"Prathet Thai","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Bhumibol Adulyadej","Capital":"3320","Code2":"TH"},{"Code":"TGO","Name":"Togo","Continent":"Africa","Region":"Western Africa","SurfaceArea":"56785.00","IndepYear":"1960","Population":"4629000","LifeExpectancy":"54.7","GNP":"1449.00","GNPOld":"1400.00","LocalName":"Togo","GovernmentForm":"Republic","HeadOfState":"Gnassingb\u00e9 Eyad\u00e9ma","Capital":"3332","Code2":"TG"},{"Code":"TKL","Name":"Tokelau","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"12.00","IndepYear":null,"Population":"2000","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Tokelau","GovernmentForm":"Nonmetropolitan Territory of New Zealand","HeadOfState":"Elisabeth II","Capital":"3333","Code2":"TK"},{"Code":"TON","Name":"Tonga","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"650.00","IndepYear":"1970","Population":"99000","LifeExpectancy":"67.9","GNP":"146.00","GNPOld":"170.00","LocalName":"Tonga","GovernmentForm":"Monarchy","HeadOfState":"Taufa'ahau Tupou IV","Capital":"3334","Code2":"TO"},{"Code":"TTO","Name":"Trinidad and Tobago","Continent":"North America","Region":"Caribbean","SurfaceArea":"5130.00","IndepYear":"1962","Population":"1295000","LifeExpectancy":"68.0","GNP":"6232.00","GNPOld":"5867.00","LocalName":"Trinidad and Tobago","GovernmentForm":"Republic","HeadOfState":"Arthur N. R. Robinson","Capital":"3336","Code2":"TT"},{"Code":"TCD","Name":"Chad","Continent":"Africa","Region":"Central Africa","SurfaceArea":"1284000.00","IndepYear":"1960","Population":"7651000","LifeExpectancy":"50.5","GNP":"1208.00","GNPOld":"1102.00","LocalName":"Tchad\/Tshad","GovernmentForm":"Republic","HeadOfState":"Idriss D\u00e9by","Capital":"3337","Code2":"TD"},{"Code":"CZE","Name":"Czech Republic","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"78866.00","IndepYear":"1993","Population":"10278100","LifeExpectancy":"74.5","GNP":"55017.00","GNPOld":"52037.00","LocalName":"\u00b8esko","GovernmentForm":"Republic","HeadOfState":"V\u00e1clav Havel","Capital":"3339","Code2":"CZ"},{"Code":"TUN","Name":"Tunisia","Continent":"Africa","Region":"Northern Africa","SurfaceArea":"163610.00","IndepYear":"1956","Population":"9586000","LifeExpectancy":"73.7","GNP":"20026.00","GNPOld":"18898.00","LocalName":"Tunis\/Tunisie","GovernmentForm":"Republic","HeadOfState":"Zine al-Abidine Ben Ali","Capital":"3349","Code2":"TN"},{"Code":"TUR","Name":"Turkey","Continent":"Asia","Region":"Middle East","SurfaceArea":"774815.00","IndepYear":"1923","Population":"66591000","LifeExpectancy":"71.0","GNP":"210721.00","GNPOld":"189122.00","LocalName":"T\u00fcrkiye","GovernmentForm":"Republic","HeadOfState":"Ahmet Necdet Sezer","Capital":"3358","Code2":"TR"},{"Code":"TKM","Name":"Turkmenistan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"488100.00","IndepYear":"1991","Population":"4459000","LifeExpectancy":"60.9","GNP":"4397.00","GNPOld":"2000.00","LocalName":"T\u00fcrkmenostan","GovernmentForm":"Republic","HeadOfState":"Saparmurad Nijazov","Capital":"3419","Code2":"TM"},{"Code":"TCA","Name":"Turks and Caicos Islands","Continent":"North America","Region":"Caribbean","SurfaceArea":"430.00","IndepYear":null,"Population":"17000","LifeExpectancy":"73.3","GNP":"96.00","GNPOld":null,"LocalName":"The Turks and Caicos Islands","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":"3423","Code2":"TC"},{"Code":"TUV","Name":"Tuvalu","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"26.00","IndepYear":"1978","Population":"12000","LifeExpectancy":"66.3","GNP":"6.00","GNPOld":null,"LocalName":"Tuvalu","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"3424","Code2":"TV"},{"Code":"UGA","Name":"Uganda","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"241038.00","IndepYear":"1962","Population":"21778000","LifeExpectancy":"42.9","GNP":"6313.00","GNPOld":"6887.00","LocalName":"Uganda","GovernmentForm":"Republic","HeadOfState":"Yoweri Museveni","Capital":"3425","Code2":"UG"},{"Code":"UKR","Name":"Ukraine","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"603700.00","IndepYear":"1991","Population":"50456000","LifeExpectancy":"66.0","GNP":"42168.00","GNPOld":"49677.00","LocalName":"Ukrajina","GovernmentForm":"Republic","HeadOfState":"Leonid Kut\u0161ma","Capital":"3426","Code2":"UA"},{"Code":"HUN","Name":"Hungary","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"93030.00","IndepYear":"1918","Population":"10043200","LifeExpectancy":"71.4","GNP":"48267.00","GNPOld":"45914.00","LocalName":"Magyarorsz\u00e1g","GovernmentForm":"Republic","HeadOfState":"Ferenc M\u00e1dl","Capital":"3483","Code2":"HU"},{"Code":"URY","Name":"Uruguay","Continent":"South America","Region":"South America","SurfaceArea":"175016.00","IndepYear":"1828","Population":"3337000","LifeExpectancy":"75.2","GNP":"20831.00","GNPOld":"19967.00","LocalName":"Uruguay","GovernmentForm":"Republic","HeadOfState":"Jorge Batlle Ib\u00e1\u00f1ez","Capital":"3492","Code2":"UY"},{"Code":"NCL","Name":"New Caledonia","Continent":"Oceania","Region":"Melanesia","SurfaceArea":"18575.00","IndepYear":null,"Population":"214000","LifeExpectancy":"72.8","GNP":"3563.00","GNPOld":null,"LocalName":"Nouvelle-Cal\u00e9donie","GovernmentForm":"Nonmetropolitan Territory of France","HeadOfState":"Jacques Chirac","Capital":"3493","Code2":"NC"},{"Code":"NZL","Name":"New Zealand","Continent":"Oceania","Region":"Australia and New Zealand","SurfaceArea":"270534.00","IndepYear":"1907","Population":"3862000","LifeExpectancy":"77.8","GNP":"54669.00","GNPOld":"64960.00","LocalName":"New Zealand\/Aotearoa","GovernmentForm":"Constitutional Monarchy","HeadOfState":"Elisabeth II","Capital":"3499","Code2":"NZ"},{"Code":"UZB","Name":"Uzbekistan","Continent":"Asia","Region":"Southern and Central Asia","SurfaceArea":"447400.00","IndepYear":"1991","Population":"24318000","LifeExpectancy":"63.7","GNP":"14194.00","GNPOld":"21300.00","LocalName":"Uzbekiston","GovernmentForm":"Republic","HeadOfState":"Islam Karimov","Capital":"3503","Code2":"UZ"},{"Code":"BLR","Name":"Belarus","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"207600.00","IndepYear":"1991","Population":"10236000","LifeExpectancy":"68.0","GNP":"13714.00","GNPOld":null,"LocalName":"Belarus","GovernmentForm":"Republic","HeadOfState":"Aljaksandr Luka\u0161enka","Capital":"3520","Code2":"BY"},{"Code":"WLF","Name":"Wallis and Futuna","Continent":"Oceania","Region":"Polynesia","SurfaceArea":"200.00","IndepYear":null,"Population":"15000","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Wallis-et-Futuna","GovernmentForm":"Nonmetropolitan Territory of France","HeadOfState":"Jacques Chirac","Capital":"3536","Code2":"WF"},{"Code":"VUT","Name":"Vanuatu","Continent":"Oceania","Region":"Melanesia","SurfaceArea":"12189.00","IndepYear":"1980","Population":"190000","LifeExpectancy":"60.6","GNP":"261.00","GNPOld":"246.00","LocalName":"Vanuatu","GovernmentForm":"Republic","HeadOfState":"John Bani","Capital":"3537","Code2":"VU"},{"Code":"VAT","Name":"Holy See (Vatican City State)","Continent":"Europe","Region":"Southern Europe","SurfaceArea":"0.40","IndepYear":"1929","Population":"1000","LifeExpectancy":null,"GNP":"9.00","GNPOld":null,"LocalName":"Santa Sede\/Citt\u00e0 del Vaticano","GovernmentForm":"Independent Church State","HeadOfState":"Johannes Paavali II","Capital":"3538","Code2":"VA"},{"Code":"VEN","Name":"Venezuela","Continent":"South America","Region":"South America","SurfaceArea":"912050.00","IndepYear":"1811","Population":"24170000","LifeExpectancy":"73.1","GNP":"95023.00","GNPOld":"88434.00","LocalName":"Venezuela","GovernmentForm":"Federal Republic","HeadOfState":"Hugo Ch\u00e1vez Fr\u00edas","Capital":"3539","Code2":"VE"},{"Code":"RUS","Name":"Russian Federation","Continent":"Europe","Region":"Eastern Europe","SurfaceArea":"17075400.00","IndepYear":"1991","Population":"146934000","LifeExpectancy":"67.2","GNP":"276608.00","GNPOld":"442989.00","LocalName":"Rossija","GovernmentForm":"Federal Republic","HeadOfState":"Vladimir Putin","Capital":"3580","Code2":"RU"},{"Code":"VNM","Name":"Vietnam","Continent":"Asia","Region":"Southeast Asia","SurfaceArea":"331689.00","IndepYear":"1945","Population":"79832000","LifeExpectancy":"69.3","GNP":"21929.00","GNPOld":"22834.00","LocalName":"Vi\u00eat Nam","GovernmentForm":"Socialistic Republic","HeadOfState":"Tr\u00e2n Duc Luong","Capital":"3770","Code2":"VN"},{"Code":"EST","Name":"Estonia","Continent":"Europe","Region":"Baltic Countries","SurfaceArea":"45227.00","IndepYear":"1991","Population":"1439200","LifeExpectancy":"69.5","GNP":"5328.00","GNPOld":"3371.00","LocalName":"Eesti","GovernmentForm":"Republic","HeadOfState":"Lennart Meri","Capital":"3791","Code2":"EE"},{"Code":"USA","Name":"United States","Continent":"North America","Region":"North America","SurfaceArea":"9363520.00","IndepYear":"1776","Population":"278357000","LifeExpectancy":"77.1","GNP":"8510700.00","GNPOld":"8110900.00","LocalName":"United States","GovernmentForm":"Federal Republic","HeadOfState":"George W. Bush","Capital":"3813","Code2":"US"},{"Code":"VIR","Name":"Virgin Islands, U.S.","Continent":"North America","Region":"Caribbean","SurfaceArea":"347.00","IndepYear":null,"Population":"93000","LifeExpectancy":"78.1","GNP":"0.00","GNPOld":null,"LocalName":"Virgin Islands of the United States","GovernmentForm":"US Territory","HeadOfState":"George W. Bush","Capital":"4067","Code2":"VI"},{"Code":"ZWE","Name":"Zimbabwe","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"390757.00","IndepYear":"1980","Population":"11669000","LifeExpectancy":"37.8","GNP":"5951.00","GNPOld":"8670.00","LocalName":"Zimbabwe","GovernmentForm":"Republic","HeadOfState":"Robert G. Mugabe","Capital":"4068","Code2":"ZW"},{"Code":"PSE","Name":"Palestine","Continent":"Asia","Region":"Middle East","SurfaceArea":"6257.00","IndepYear":null,"Population":"3101000","LifeExpectancy":"71.4","GNP":"4173.00","GNPOld":null,"LocalName":"Filastin","GovernmentForm":"Autonomous Area","HeadOfState":"Yasser (Yasir) Arafat","Capital":"4074","Code2":"PS"},{"Code":"ATA","Name":"Antarctica","Continent":"Antarctica","Region":"Antarctica","SurfaceArea":"13120000.00","IndepYear":null,"Population":"0","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"\u2013","GovernmentForm":"Co-administrated","HeadOfState":"","Capital":null,"Code2":"AQ"},{"Code":"BVT","Name":"Bouvet Island","Continent":"Antarctica","Region":"Antarctica","SurfaceArea":"59.00","IndepYear":null,"Population":"0","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Bouvet\u00f8ya","GovernmentForm":"Dependent Territory of Norway","HeadOfState":"Harald V","Capital":null,"Code2":"BV"},{"Code":"IOT","Name":"British Indian Ocean Territory","Continent":"Africa","Region":"Eastern Africa","SurfaceArea":"78.00","IndepYear":null,"Population":"0","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"British Indian Ocean Territory","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":null,"Code2":"IO"},{"Code":"SGS","Name":"South Georgia and the South Sandwich Islands","Continent":"Antarctica","Region":"Antarctica","SurfaceArea":"3903.00","IndepYear":null,"Population":"0","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"South Georgia and the South Sandwich Islands","GovernmentForm":"Dependent Territory of the UK","HeadOfState":"Elisabeth II","Capital":null,"Code2":"GS"},{"Code":"HMD","Name":"Heard Island and McDonald Islands","Continent":"Antarctica","Region":"Antarctica","SurfaceArea":"359.00","IndepYear":null,"Population":"0","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Heard and McDonald Islands","GovernmentForm":"Territory of Australia","HeadOfState":"Elisabeth II","Capital":null,"Code2":"HM"},{"Code":"ATF","Name":"French Southern territories","Continent":"Antarctica","Region":"Antarctica","SurfaceArea":"7780.00","IndepYear":null,"Population":"0","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"Terres australes fran\u00e7aises","GovernmentForm":"Nonmetropolitan Territory of France","HeadOfState":"Jacques Chirac","Capital":null,"Code2":"TF"},{"Code":"UMI","Name":"United States Minor Outlying Islands","Continent":"Oceania","Region":"Micronesia\/Caribbean","SurfaceArea":"16.00","IndepYear":null,"Population":"0","LifeExpectancy":null,"GNP":"0.00","GNPOld":null,"LocalName":"United States Minor Outlying Islands","GovernmentForm":"Dependent Territory of the US","HeadOfState":"George W. Bush","Capital":null,"Code2":"UM"}]} Adding Paging Functionality Now that I have the service setup that returns all data, I am going to add some logic so that I can handle data paging as well. To do so, I am going to ask the client to send me some additional request parameters along, which is going to tell the service about the client view and about the data page requested. In PHP code, once I have that information I can construct the correct SQL query and use the rest of the logic in tacked regarding connection and json serializing in place. To the PHP code we’ve already written above, I am going to add some additional variables which is going to keep track of pageSize & pageIndex as well. 1: $pageSize = 0; 2: $pageIndex = -1; 3: 4: foreach ( $_GET as $key=>$value ) { 5: // translate paging params to the SQL query 6: if ($key == "psize") { 7: $pageSize = $value; 8: } else if ($key == "page") { 9: $pageIndex = $value; 10: } 11: } 12: 13: //paging (LIMIT) 14: if ($pageSize > 0 && $pageIndex >= 0) { 15: $startIndex = $pageIndex * $pageSize; 16: $q = $q . " LIMIT $startIndex, $pageSize"; 17: } Adding Sorting Functionality Next, I am going to extend the service to add sorting capability. Same idea as with paging enhancement, the request is going to have the sorting information as request parameters that the service is going to decipher and query the database accordingly. The result will be sent back to the client as JSON. The code I will add to the service is as follows. 1: $orderBy = " ORDER BY "; 2: 3: $multiSort = false; 4: $multiFilter = false; 5: 6: // this will go in the "foreach" statement to handle sorting 7: if (strpos($key, "sort(") >= 0 && strpos($key, "sort(") !== false) { 8: 9: if ($multiSort) { 10: 11: $orderBy = $orderBy . ", "; 12: } 13: $orderBy = $orderBy . substr(substr($key, 0, strlen($key)-1), strpos($key, "(") + 1) . " " . $value; 14: $multiSort = true; 15: } 16: 17: //this will go right before adding the paging parameters to the query 18: if ($orderBy != " ORDER BY ") { 19: // sorting (ORDER BY) 20: $q = $q . $orderBy; 21: } Creating View For the view, I am going to use the jQuery grid that’s in the NetAdvantage for jQuery package. For the datasource, I am going to give it a PHP service URL to fetch all data and then enable sorting and paging option on it. Once the user tries to sort or page the data, it is going to call the same PHP service again with the right set of request parameters and will get the correct data to display in the grid area. Here is what the jQuery method it going to look like, I already have a table element in the HTML with an id of “grid1”. 1: $("#grid1").igGrid({ 2: autoGenerateColumns: false, 3: virtualization: false, 4: columns: [ 5: { headerText: "Country Code", key: "Code", width: "150px", dataType: "string" }, 6: { headerText: "Country Name", key: "Name", width: "170px", dataType: "string" }, 7: { headerText: "Continent", key: "Continent", width: "150px", dataType: "string" }, 8: { headerText: "Region", key: "Region", width: "230px", dataType: "string" }, 9: { headerText: "Head of State", key: "HeadOfState", width: "250px", dataType: "string" }, 10: { headerText: "GNP", key: "GNP", width: "100px", dataType: "number" }, 11: { headerText: "Population", key: "Population", width: "130px", dataType: "number" }, 12: { headerText: "LifeExpectancy", key: "LifeExpectancy", width: "150px", dataType: "number" } 13: ], 14: dataSource: '/Samples/demos.dev/server/server.php', 15: responseDataKey: 'records', 16: height: 400, 17: features: [ 18: { 19: name: 'Paging', 20: recordCountKey: 'totalCount', 21: pageSizeUrlKey: 'psize', 22: pageIndexUrlKey: 'page', 23: type: "remote" 24: }, 25: { 26: name: 'Sorting', 27: sortUrlKey: "sort", // same for sorting 28: sortUrlKeyAscValue: "asc", 29: sortUrlKeyDescValue: "desc", 30: type: "remote" 31: } 32: ] 33: }); If this is your first view at the client grid and the code above seems like a lot, I would suggest you check out our samples library, which contains a lot of getting started material. In the end, the grid will display country data with sorting and paging enabled. Summary In this example, I showed you how to connect the jQuery grid to a PHP service. You should be able to use the same service as a data resource for any of the other controls in NetAdvantage for jQuery package as well. In addition, instead of a PHP service, it could be a data service based on any framework, the same concepts can be applied and NetAdvantage jQuery controls can be used to build the front-end. As always, if there are any questions on this blog post or regarding the product, shoot me an email at murtazaa@infragistics.com