Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. $kml = new DomDocument();
  2. $population = [];
  3. $descr_tag = $kml->getElementsByTagName("description");
  4. foreach($descr_tag as $d) {
  5. $pop = simplexml_load_string("<base>".$d->nodeValue."</base>");
  6. $population[] = (string)$pop->xpath("//li[strong/span[text()='Population']]")[0]->span;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement