I am trying to echo a string from a Recursive function:
echo \"
and
echo \"
echo is a language construct and can accept multiple arguments separated by a comma. The effect is identical to a concatenated string.
The output shouldn't be different - I can't think of an instance where it could be.
Edit: Ah, but it is. That is because your function echo()es stuff. In the first instance, and $node get output; then the function's output comes.
I would have WriteList simply return values recursively.