h1

Print windows line endings with PHP

March 11, 2011

To print windows line endings when writing to a file using php you can use \r\n escape characters. e.g.

print "some line \r\n";

For unix/linux style line endings you just use \n;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: