I'm having a total brain freeze trying to get an array passed back from a function so that I can then access its values. The function is as follows:
function queryKeys($value) {
global $wpdb;
$query = "SELECT * FROM um_taxkeys WHERE key_id = 1334";
$key = $wpdb->get_row( $query );
$array["value_en"] = $key->name_en;
$array["value_es"] = $key->name_es;
$array["value_de"] = $key->name_de;
return $array;
//var_dump($array);
}
...and I've tried accessing it using:
...
queryKeys($value);
echo $array['value_es'];
...
...but I am getting confused on the correct syntax to use to get values back from the returned array. Appreciate some guidance please. Many thanks.