Skip to content

anonymous /gist:8965278

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<?php
$modx->getService('lexicon','modLexicon');
$modx->lexicon->load('[redacted]:continents');
// -------------
// Source: http://snipplr.com/view/36870/
$continent = '';
if ($code == 'AF') $continent = $modx->lexicon('continents.asia');
if ($code == 'AX') $continent = $modx->lexicon('continents.europe');
if ($code == 'AL') $continent = $modx->lexicon('continents.europe');
if ($code == 'DZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'AS') $continent = $modx->lexicon('continents.oceania');
if ($code == 'AD') $continent = $modx->lexicon('continents.europe');
if ($code == 'AO') $continent = $modx->lexicon('continents.africa');
if ($code == 'AI') $continent = $modx->lexicon('continents.north_america');
if ($code == 'AQ') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'AG') $continent = $modx->lexicon('continents.north_america');
if ($code == 'AR') $continent = $modx->lexicon('continents.south_america');
if ($code == 'AM') $continent = $modx->lexicon('continents.asia');
if ($code == 'AW') $continent = $modx->lexicon('continents.north_america');
if ($code == 'AU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'AT') $continent = $modx->lexicon('continents.europe');
if ($code == 'AZ') $continent = $modx->lexicon('continents.asia');
if ($code == 'BS') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BH') $continent = $modx->lexicon('continents.asia');
if ($code == 'BD') $continent = $modx->lexicon('continents.asia');
if ($code == 'BB') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BY') $continent = $modx->lexicon('continents.europe');
if ($code == 'BE') $continent = $modx->lexicon('continents.europe');
if ($code == 'BZ') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BJ') $continent = $modx->lexicon('continents.africa');
if ($code == 'BM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BT') $continent = $modx->lexicon('continents.asia');
if ($code == 'BO') $continent = $modx->lexicon('continents.south_america');
if ($code == 'BA') $continent = $modx->lexicon('continents.europe');
if ($code == 'BW') $continent = $modx->lexicon('continents.africa');
if ($code == 'BV') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'BR') $continent = $modx->lexicon('continents.south_america');
if ($code == 'IO') $continent = $modx->lexicon('continents.asia');
if ($code == 'VG') $continent = $modx->lexicon('continents.north_america');
if ($code == 'BN') $continent = $modx->lexicon('continents.asia');
if ($code == 'BG') $continent = $modx->lexicon('continents.europe');
if ($code == 'BF') $continent = $modx->lexicon('continents.africa');
if ($code == 'BI') $continent = $modx->lexicon('continents.africa');
if ($code == 'KH') $continent = $modx->lexicon('continents.asia');
if ($code == 'CM') $continent = $modx->lexicon('continents.africa');
if ($code == 'CA') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CV') $continent = $modx->lexicon('continents.africa');
if ($code == 'KY') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CF') $continent = $modx->lexicon('continents.africa');
if ($code == 'TD') $continent = $modx->lexicon('continents.africa');
if ($code == 'CL') $continent = $modx->lexicon('continents.south_america');
if ($code == 'CN') $continent = $modx->lexicon('continents.asia');
if ($code == 'CX') $continent = $modx->lexicon('continents.asia');
if ($code == 'CC') $continent = $modx->lexicon('continents.asia');
if ($code == 'CO') $continent = $modx->lexicon('continents.south_america');
if ($code == 'KM') $continent = $modx->lexicon('continents.africa');
if ($code == 'CD') $continent = $modx->lexicon('continents.africa');
if ($code == 'CG') $continent = $modx->lexicon('continents.africa');
if ($code == 'CK') $continent = $modx->lexicon('continents.oceania');
if ($code == 'CR') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CI') $continent = $modx->lexicon('continents.africa');
if ($code == 'HR') $continent = $modx->lexicon('continents.europe');
if ($code == 'CU') $continent = $modx->lexicon('continents.north_america');
if ($code == 'CY') $continent = $modx->lexicon('continents.asia');
if ($code == 'CZ') $continent = $modx->lexicon('continents.europe');
if ($code == 'DK') $continent = $modx->lexicon('continents.europe');
if ($code == 'DJ') $continent = $modx->lexicon('continents.africa');
if ($code == 'DM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'DO') $continent = $modx->lexicon('continents.north_america');
if ($code == 'EC') $continent = $modx->lexicon('continents.south_america');
if ($code == 'EG') $continent = $modx->lexicon('continents.africa');
if ($code == 'SV') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GQ') $continent = $modx->lexicon('continents.africa');
if ($code == 'ER') $continent = $modx->lexicon('continents.africa');
if ($code == 'EE') $continent = $modx->lexicon('continents.europe');
if ($code == 'ET') $continent = $modx->lexicon('continents.africa');
if ($code == 'FO') $continent = $modx->lexicon('continents.europe');
if ($code == 'FK') $continent = $modx->lexicon('continents.south_america');
if ($code == 'FJ') $continent = $modx->lexicon('continents.oceania');
if ($code == 'FI') $continent = $modx->lexicon('continents.europe');
if ($code == 'FR') $continent = $modx->lexicon('continents.europe');
if ($code == 'GF') $continent = $modx->lexicon('continents.south_america');
if ($code == 'PF') $continent = $modx->lexicon('continents.oceania');
if ($code == 'TF') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'GA') $continent = $modx->lexicon('continents.africa');
if ($code == 'GM') $continent = $modx->lexicon('continents.africa');
if ($code == 'GE') $continent = $modx->lexicon('continents.asia');
if ($code == 'DE') $continent = $modx->lexicon('continents.europe');
if ($code == 'GH') $continent = $modx->lexicon('continents.africa');
if ($code == 'GI') $continent = $modx->lexicon('continents.europe');
if ($code == 'GR') $continent = $modx->lexicon('continents.europe');
if ($code == 'GL') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GD') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GP') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'GT') $continent = $modx->lexicon('continents.north_america');
if ($code == 'GG') $continent = $modx->lexicon('continents.europe');
if ($code == 'GN') $continent = $modx->lexicon('continents.africa');
if ($code == 'GW') $continent = $modx->lexicon('continents.africa');
if ($code == 'GY') $continent = $modx->lexicon('continents.south_america');
if ($code == 'HT') $continent = $modx->lexicon('continents.north_america');
if ($code == 'HM') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'VA') $continent = $modx->lexicon('continents.europe');
if ($code == 'HN') $continent = $modx->lexicon('continents.north_america');
if ($code == 'HK') $continent = $modx->lexicon('continents.asia');
if ($code == 'HU') $continent = $modx->lexicon('continents.europe');
if ($code == 'IS') $continent = $modx->lexicon('continents.europe');
if ($code == 'IN') $continent = $modx->lexicon('continents.asia');
if ($code == 'ID') $continent = $modx->lexicon('continents.asia');
if ($code == 'IR') $continent = $modx->lexicon('continents.asia');
if ($code == 'IQ') $continent = $modx->lexicon('continents.asia');
if ($code == 'IE') $continent = $modx->lexicon('continents.europe');
if ($code == 'IM') $continent = $modx->lexicon('continents.europe');
if ($code == 'IL') $continent = $modx->lexicon('continents.asia');
if ($code == 'IT') $continent = $modx->lexicon('continents.europe');
if ($code == 'JM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'JP') $continent = $modx->lexicon('continents.asia');
if ($code == 'JE') $continent = $modx->lexicon('continents.europe');
if ($code == 'JO') $continent = $modx->lexicon('continents.asia');
if ($code == 'KZ') $continent = $modx->lexicon('continents.asia');
if ($code == 'KE') $continent = $modx->lexicon('continents.africa');
if ($code == 'KI') $continent = $modx->lexicon('continents.oceania');
if ($code == 'KP') $continent = $modx->lexicon('continents.asia');
if ($code == 'KR') $continent = $modx->lexicon('continents.asia');
if ($code == 'KW') $continent = $modx->lexicon('continents.asia');
if ($code == 'KG') $continent = $modx->lexicon('continents.asia');
if ($code == 'LA') $continent = $modx->lexicon('continents.asia');
if ($code == 'LV') $continent = $modx->lexicon('continents.europe');
if ($code == 'LB') $continent = $modx->lexicon('continents.asia');
if ($code == 'LS') $continent = $modx->lexicon('continents.africa');
if ($code == 'LR') $continent = $modx->lexicon('continents.africa');
if ($code == 'LY') $continent = $modx->lexicon('continents.africa');
if ($code == 'LI') $continent = $modx->lexicon('continents.europe');
if ($code == 'LT') $continent = $modx->lexicon('continents.europe');
if ($code == 'LU') $continent = $modx->lexicon('continents.europe');
if ($code == 'MO') $continent = $modx->lexicon('continents.asia');
if ($code == 'MK') $continent = $modx->lexicon('continents.europe');
if ($code == 'MG') $continent = $modx->lexicon('continents.africa');
if ($code == 'MW') $continent = $modx->lexicon('continents.africa');
if ($code == 'MY') $continent = $modx->lexicon('continents.asia');
if ($code == 'MV') $continent = $modx->lexicon('continents.asia');
if ($code == 'ML') $continent = $modx->lexicon('continents.africa');
if ($code == 'MT') $continent = $modx->lexicon('continents.europe');
if ($code == 'MH') $continent = $modx->lexicon('continents.oceania');
if ($code == 'MQ') $continent = $modx->lexicon('continents.north_america');
if ($code == 'MR') $continent = $modx->lexicon('continents.africa');
if ($code == 'MU') $continent = $modx->lexicon('continents.africa');
if ($code == 'YT') $continent = $modx->lexicon('continents.africa');
if ($code == 'MX') $continent = $modx->lexicon('continents.north_america');
if ($code == 'FM') $continent = $modx->lexicon('continents.oceania');
if ($code == 'MD') $continent = $modx->lexicon('continents.europe');
if ($code == 'MC') $continent = $modx->lexicon('continents.europe');
if ($code == 'MN') $continent = $modx->lexicon('continents.asia');
if ($code == 'ME') $continent = $modx->lexicon('continents.europe');
if ($code == 'MS') $continent = $modx->lexicon('continents.north_america');
if ($code == 'MA') $continent = $modx->lexicon('continents.africa');
if ($code == 'MZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'MM') $continent = $modx->lexicon('continents.asia');
if ($code == 'NA') $continent = $modx->lexicon('continents.africa');
if ($code == 'NR') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NP') $continent = $modx->lexicon('continents.asia');
if ($code == 'AN') $continent = $modx->lexicon('continents.north_america');
if ($code == 'NL') $continent = $modx->lexicon('continents.europe');
if ($code == 'NC') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NZ') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NI') $continent = $modx->lexicon('continents.north_america');
if ($code == 'NE') $continent = $modx->lexicon('continents.africa');
if ($code == 'NG') $continent = $modx->lexicon('continents.africa');
if ($code == 'NU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NF') $continent = $modx->lexicon('continents.oceania');
if ($code == 'MP') $continent = $modx->lexicon('continents.oceania');
if ($code == 'NO') $continent = $modx->lexicon('continents.europe');
if ($code == 'OM') $continent = $modx->lexicon('continents.asia');
if ($code == 'PK') $continent = $modx->lexicon('continents.asia');
if ($code == 'PW') $continent = $modx->lexicon('continents.oceania');
if ($code == 'PS') $continent = $modx->lexicon('continents.asia');
if ($code == 'PA') $continent = $modx->lexicon('continents.north_america');
if ($code == 'PG') $continent = $modx->lexicon('continents.oceania');
if ($code == 'PY') $continent = $modx->lexicon('continents.south_america');
if ($code == 'PE') $continent = $modx->lexicon('continents.south_america');
if ($code == 'PH') $continent = $modx->lexicon('continents.asia');
if ($code == 'PN') $continent = $modx->lexicon('continents.oceania');
if ($code == 'PL') $continent = $modx->lexicon('continents.europe');
if ($code == 'PT') $continent = $modx->lexicon('continents.europe');
if ($code == 'PR') $continent = $modx->lexicon('continents.north_america');
if ($code == 'QA') $continent = $modx->lexicon('continents.asia');
if ($code == 'RE') $continent = $modx->lexicon('continents.africa');
if ($code == 'RO') $continent = $modx->lexicon('continents.europe');
if ($code == 'RU') $continent = $modx->lexicon('continents.europe');
if ($code == 'RW') $continent = $modx->lexicon('continents.africa');
if ($code == 'BL') $continent = $modx->lexicon('continents.north_america');
if ($code == 'SH') $continent = $modx->lexicon('continents.africa');
if ($code == 'KN') $continent = $modx->lexicon('continents.north_america');
if ($code == 'LC') $continent = $modx->lexicon('continents.north_america');
if ($code == 'MF') $continent = $modx->lexicon('continents.north_america');
if ($code == 'PM') $continent = $modx->lexicon('continents.north_america');
if ($code == 'VC') $continent = $modx->lexicon('continents.north_america');
if ($code == 'WS') $continent = $modx->lexicon('continents.oceania');
if ($code == 'SM') $continent = $modx->lexicon('continents.europe');
if ($code == 'ST') $continent = $modx->lexicon('continents.africa');
if ($code == 'SA') $continent = $modx->lexicon('continents.asia');
if ($code == 'SN') $continent = $modx->lexicon('continents.africa');
if ($code == 'RS') $continent = $modx->lexicon('continents.europe');
if ($code == 'SC') $continent = $modx->lexicon('continents.africa');
if ($code == 'SL') $continent = $modx->lexicon('continents.africa');
if ($code == 'SG') $continent = $modx->lexicon('continents.asia');
if ($code == 'SK') $continent = $modx->lexicon('continents.europe');
if ($code == 'SI') $continent = $modx->lexicon('continents.europe');
if ($code == 'SB') $continent = $modx->lexicon('continents.oceania');
if ($code == 'SO') $continent = $modx->lexicon('continents.africa');
if ($code == 'ZA') $continent = $modx->lexicon('continents.africa');
if ($code == 'GS') $continent = $modx->lexicon('continents.antarctica');
if ($code == 'ES') $continent = $modx->lexicon('continents.europe');
if ($code == 'LK') $continent = $modx->lexicon('continents.asia');
if ($code == 'SD') $continent = $modx->lexicon('continents.africa');
if ($code == 'SR') $continent = $modx->lexicon('continents.south_america');
if ($code == 'SJ') $continent = $modx->lexicon('continents.europe');
if ($code == 'SZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'SE') $continent = $modx->lexicon('continents.europe');
if ($code == 'CH') $continent = $modx->lexicon('continents.europe');
if ($code == 'SY') $continent = $modx->lexicon('continents.asia');
if ($code == 'TW') $continent = $modx->lexicon('continents.asia');
if ($code == 'TJ') $continent = $modx->lexicon('continents.asia');
if ($code == 'TZ') $continent = $modx->lexicon('continents.africa');
if ($code == 'TH') $continent = $modx->lexicon('continents.asia');
if ($code == 'TL') $continent = $modx->lexicon('continents.asia');
if ($code == 'TG') $continent = $modx->lexicon('continents.africa');
if ($code == 'TK') $continent = $modx->lexicon('continents.oceania');
if ($code == 'TO') $continent = $modx->lexicon('continents.oceania');
if ($code == 'TT') $continent = $modx->lexicon('continents.north_america');
if ($code == 'TN') $continent = $modx->lexicon('continents.africa');
if ($code == 'TR') $continent = $modx->lexicon('continents.asia');
if ($code == 'TM') $continent = $modx->lexicon('continents.asia');
if ($code == 'TC') $continent = $modx->lexicon('continents.north_america');
if ($code == 'TV') $continent = $modx->lexicon('continents.oceania');
if ($code == 'UG') $continent = $modx->lexicon('continents.africa');
if ($code == 'UA') $continent = $modx->lexicon('continents.europe');
if ($code == 'AE') $continent = $modx->lexicon('continents.asia');
if ($code == 'GB') $continent = $modx->lexicon('continents.europe');
if ($code == 'US') $continent = $modx->lexicon('continents.north_america');
if ($code == 'UM') $continent = $modx->lexicon('continents.oceania');
if ($code == 'VI') $continent = $modx->lexicon('continents.north_america');
if ($code == 'UY') $continent = $modx->lexicon('continents.south_america');
if ($code == 'UZ') $continent = $modx->lexicon('continents.asia');
if ($code == 'VU') $continent = $modx->lexicon('continents.oceania');
if ($code == 'VE') $continent = $modx->lexicon('continents.south_america');
if ($code == 'VN') $continent = $modx->lexicon('continents.asia');
if ($code == 'WF') $continent = $modx->lexicon('continents.oceania');
if ($code == 'EH') $continent = $modx->lexicon('continents.africa');
if ($code == 'YE') $continent = $modx->lexicon('continents.asia');
if ($code == 'ZM') $continent = $modx->lexicon('continents.africa');
if ($code == 'ZW') $continent = $modx->lexicon('continents.africa');
return $continent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.