mrandrewmills/Fixed-Width-Text-File-Toolkit

Create additional format transformations?

mrandrewmills opened this issue · 3 comments

Can we export to XML? And CSV? What about SQL?

The more I think about and research this particular issue, the more I think that the class itself should just extract the data from the fixed width text file and put it into a PHP array. I'm thinking that there should be a second class for transforming arrays into JSON, XML, CSV, etc. and that this would be a more generic class that could be included in different projects.

Okay, so transforming the array into JSON is fairly trivial with the PHP json_encode function, and that could be easily included in the tutorial so people can do that even without resorting to including another class. Then people can use whatever class/library/utility (even home grown code) they prefer to handle the more exotic transformations.

Extraneous format conversion methods have been removed.