Hello all ;-)
I have a pretty large list of countries in this format
$prof['countries'][204] = "United Kingdom";
$prof['countries'][205] = "USA";
$prof['countries'][206] = "Uruguay";
$prof['countries'][207] = "Uzbekistan";
$prof['countries'][208] = "Vanuatu";
$prof['countries'][209] = "Vatican";
$prof['countries'][210] = "Venezuela";
$prof['countries'][211] = "Viet Nam";
$prof['countries'][212] = "Virgin Islands";
$prof['countries'][213] = "Western Sahara";
$prof['countries'][214] = "Yeman";
$prof['countries'][215] = "Yugoslavia";
$prof['countries'][216] = "Zaire";
$prof['countries'][217] = "Zambia";
$prof['countries'][218] = "Zimbabwe";
#This is this still part of $prof
$prof['religion'][0] = "I prefer not to say";
$prof['religion'][1] = "Adventist";
$prof['religion'][2] = "Agnostic";
$prof['religion'][3] = "Atheist";
$prof['religion'][4] = "Baptist";
$prof['religion'][5] = "Buddhist";
$prof['religion'][6] = "Caodaism";
In the data base they stored just the number for the country i.e. 205 for someone who is in the USA.
What are the different ways to echo specific parts of $prof on a page does it always have to be like
echo $prof['countries'][205];
Next I'd like to create a cross reference list of countries that meet the ISO3166 standard
GB GBR 826 United Kingdom of Great Britain & N. Ireland
UM UMI 581 United States Minor Outlying Islands
US USA 840 United States of America
UY URY 858 Uruguay, Eastern Republic of
UZ UZB 860 Uzbekistan
VU VUT 548 Vanuatu
VE VEN 862 Venezuela, Bolivarian Republic of
VN VNM 704 Viet Nam, Socialist Republic of
WF WLF 876 Wallis and Futuna Islands
EH ESH 732 Western Sahara
YE YEM 887 Yemen
ZM ZMB 894 Zambia, Republic of
ZW ZWE 716 Zimbabwe
So now I have a 2 digit code a 3 digit code and a 3 digit numaric code.
Could I create a seperate list like this with the $iso
$prof['countries'][205] = "USA";
$iso['countries'][205][US][USA][840] = "United States of America";
or would I need to do it this way.
$prof['countries'][205] = "USA";
$iso2['countries'][205] = "US";
$iso3['countries'][205] = "USA";
$iso3['countries'][205] = "840";
Basically what I want is to know the array number like 205 and fetch the 2 digit and/or 3 digit and/or 3 digit numeric code
I'm just trying to figure out the best way to get any of the codes for a country...
Here is an idea but don't know if this will work at all
What if I replaced the values in
$prof['countries'][205] = "USA";
WITH
$prof['countries'][205] = $ISO["countryname"];
THEN
$ISO["countryname"][205] = "United States of America";
$ISO['code2'][205] = "US";
$ISO['code3'][205] = "USA";
$ISO['code4'][205] = "840";
mmm, maybe I'm confusing my self now.....LOL