I need to access an array value but don't know all the values to call until I get them from a different array value. I'm not explaining this well so I will show some of the code below (This is from a drupal based website).
I want to access this value:
$variables[taxonomy][taxonomy_term_1083][title]
The problem is I don't know the term id (1083) until I have accessed this value:
$variables[field_journal_name][0][value]
I have tried creating a string that combines the term id with the rest of the array:
$termid = $variables[field_journal_name][0][value];
$taxname = 'variables[taxonomy][taxonomy_term_'.$termid.'][title]';
and then using the variable variable method:
$name = ${$taxname};
and many different variations of this but nothing seems to work.
Any ideas would be greatly appreciated.
Thanks - Dave.