I guess this is sort of a newbie question... I don't know. I'm sort of familiar with 1D arrays but this multi dimensional array stuff is throwing me for a loop, no pun intended, hah.
I have been working on this all afternoon and have gotten nowhere with it... I'm hopeful that someone here can help me straighten this out.
I have an array called $request and it contains other arrays.
The following example is where I'm adding two new things to the array:
$request['param'][] = 'temp';
$request['temp']['desc'] = '2m Temperature';
$request['temp']['unit'] = 'Celcius';
$request['param'][] = 'dew';
$request['dew']['desc'] = 'Dew Point temperature';
$request['dew']['unit'] = 'Celcius';
Now I want to echo ONLY the 'desc' values for each 'param' key. In other words, I want to somehow echo only:
2m Temperature
Dew Point Temperature
And then I'll also want to do the same with ONLY the 'unit' key as well.
Obviously I need some sort of nested while or for loop but for some reason I just can't seem to wrap my mind around the logic for this. Can someone please help?
Regards,
Mark