How to output the parsed now. What should be written after the echo or print statement to display the text.
Answer 1, authority 100%
Do a var_dump($name);and I think you will see where and what lies.
Answer 2, authority 50%
... $name = implode("", $name); echo $name;
Similar to the print function:
... $name = implode("", $name); print $foo;