This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function world_cities(){ | |
$csv = array_map( 'str_getcsv', file( plugin_dir_path( __FILE__ ) . 'data/countries_bordered1.csv', FILE_SKIP_EMPTY_LINES ) ); | |
$headers = $csv[0]; | |
unset($csv[0]); | |
$rowsWithKeys = []; | |
foreach ( $csv as $row ) { | |
$newRow = []; | |
foreach ( $headers as $k => $key ) { |
NewerOlder