Exactly! That was my problem... which I don't know how to do it.
I call the rmenu function as you suggested here.
$res = rmenu("$dir"."/"."$dA[$i]", $j);
The function takes this alright. But, only returns the last return values. Apparently, the output of the rmenu function discards the previous return values as it calls itself (recursively) several times.
And as you suggested, I WANT to collect all the returns into an array; and have the function spit it back to me. But, I don't know how!?!?
Even if I put at the end of the script something like:
$allArray[]=$fA;
It wouldn't hold the previous return values, since the function starts itself again (by recalling itself). Therefore, the result only would look like
$res[][$i] -> file values.
That is, it has two-dimensional array with the first [] empty; and it has only the last value that was sent by the rmenu function. Using $allArray.=$fA also result in the same...
Maybe, I will just use echo with table format in this rmenu function; then call it from an appropriate place (between <td> rmenu($dir, $j)</td> place) in the index.php...
BUT, definitely I would like to know how to hold the values of recursive function result...
And I really thank you, David. You helped me think clearly!