jakebur01 Posted December 13, 2007 Share Posted December 13, 2007 Hello, I have some price files that our vendor provides me with that is in comma delimited format. I generally have to spend a lot of time editing this file in excell in order to get in the right format to be uploaded into our inventory program(as a tab delimited text file). I use php a lot with mysql. Would it be ideal for me to use php to edit these csv files and spit them out as tab delimited files. I am wanting to build a program with php that would edit this file automatically and save it as a tab delimited file. (The manipulation that I do to the csv files involves concatinating "TB" in front of some part numbers and calculating some costs and price quanity breaks. How should I go about doing this. Would you use mysql to edit the data. Also, can php save files across a network? Thanks, Jake Quote Link to comment Share on other sites More sharing options...
paul2463 Posted December 13, 2007 Share Posted December 13, 2007 <?php function createTabList($text) { $outStr = str_replace(",", "\\t", "$text"); Return $outStr; } $str = "h,f,r,j,"; echo createTabList($str); ?> // outputs h\tf\tr\tj\t Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.