Public feed #531304

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-06-02 13:04 UTC
rendered paste body
<?php
  $query = $sql->query("SELECT rd_countries.name, rd_continents.name, rd_countries.id, rd_continents.id FROM rd_countries, rd_continents ORDER BY rd_continents.id");

$countries = array();
while ($row = mysql_fetch_array($query)) {
    $countries[$row['continent']][] = $row['country'];
}

print_r($countries);
?>