I have read and read but can't seem to find the parser which will give me the results I expect from the following request. I do not understand why I am getting the alpha country code on the end of the return value. I have shown what is returned when I select Algeria or 'dz'. I only expect 2185
Request Code:
reset($country_maxinsure);
while (list($key,$value) = each($country_maxinsure)) {
if(strcasecmp($destCountryCode,$key)==0){
$destCountryCode = strtoupper($value);
break;
}
}
$maxins = urlencode($destCountryCode);
if ($maxins == 0){
$usps_ins = 0;
}
if ($packageValue > $maxins) $packageValue = $maxins;
echo $maxins;
Portion of array:
$country_maxinsure = array(
'af' => 0,
'al' => 0,
'dz' => 2185,
'ad' => 5000,
'ao' => 0,
'ai' => 415,
'ag' => 60,
'ar' => 5000,
'am' => 1350,
Actual return: I have highlighted the echoed value!
2185dz
Selected shipping service:
International USPS Airmail Parcel Post 4-10 Days
Shipping: $16
Insurance: $6.85
Cost: $22.85
Shipping Weight: 1 lbs.
Shipping Dest: :Algeria
Close Window
Thanks once again for help on what I am doing wrong!!!!!!!