Hello
Quick question about in_array and how to echo the results if it exists.
What I am wanting to do is check the below array for the variable $countryCode if it exists echo the $countryCode and the proceeding symbol in the array. But it doesnt seem to be working.
Here is the code and array
$symbol = array('USD' => '$', 'CAD' => '$', 'GBP' => '£', 'EUR' => '€', 'AUD' => '$');
$countryCode='EUR';
if (in_array($countryCode, $symbol)) {
echo ""; //Wanting to echo the results of what was in the array Meaning CAD and the symbol associated with it CAD €
}
Any Help would be appericated
Thanks