Posted By

MartinY on 11/16/07


Tagged

php combo


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

vali29
scyfox
mfigge


Combo de paises mediante geonames


 / Published in: PHP
 

aun no acabado

  1. <?php
  2.  
  3. $xmlpaises = 'http://ws.geonames.org/countryInfo?lang=es';
  4. // http://ws.geonames.org/children?geonameId=2510769&lang=es
  5.  
  6.  
  7. $paises = simplexml_load_file($xmlpaises);
  8. $i = 0;
  9. foreach ($paises->country as $pais) {
  10. echo $pais->isoNumeric.' - '.$pais->geonameId.' - '.$pais->countryName.'</br>';
  11. $i++;
  12. }
  13. echo $i;
  14.  
  15.  
  16.  
  17. ?>

Report this snippet  

You need to login to post a comment.