macinslaw Posted August 2, 2007 Share Posted August 2, 2007 I have some results of many sql statements being written to a file for use by a third party software. The software cannot use the "\n" end of line, instead the require a Carriage Return + Line Feed for windows. Can anyone tell me the method by whih to do so? An example is below: <? $m = "something[1,1]\t$something\n"; $data .= $m; $data= str_replace('"', "", $data); fwrite($fp,$data); // Write information to the file fclose($fp); // Close the file echo "File Created Successfully"; } else { echo "Error saving file!"; } ?> Thanks -Mac Quote Link to comment Share on other sites More sharing options...
effigy Posted August 2, 2007 Share Posted August 2, 2007 echo "\r\n"; Quote Link to comment Share on other sites More sharing options...
macinslaw Posted August 2, 2007 Author Share Posted August 2, 2007 Thanks, I have tried this and am not certain whether it will fit the bill, are there other ways to produce a windows carriage return? I will mark this as resolved until I hear back from the testing center where the file was sent. Thanks for the help! -Mac 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.