Well, you didn't say what the problem is, but I'd bet that you're only getting a single space between items.
Wrap your output in <pre>data</pre> tags to maintain the formatting.
Or, you could use str_replace() (or other similar function) to replace each tab with " "
-Rich