Hi all, This is a basic looping question but with a twist, so it's likely that i'm missing something easy - apologies in advance...
I'm trying to pull the results from an array $testoutput - which is filled with 3 arrays:
Running the following code:
foreach ($testoutput as $ID => $Array) {
echo $Array . "<BR>";
}
Returns:
ARRAY
ARRAY
ARRAY
Adding a second nested loop with the following code:
foreach ($testoutput as $ID => $Array) {
foreach ($Array as $ID => $L1item) {
echo $L1item . "<BR>";
}
}
Results in:
String1a
String1b
String1c
ARRAY
String2a
String2b
String2c
ARRAY
String3a
String3b
String3c
ARRAY
I'm fine with retuning all of the above strings, however, I can't figure out how to return the values from the 3rd-level of nested Arrays.
Is there an easy way to do this?
Many thanks in advance.