[ create a new paste ] login | about

Link: http://codepad.org/Qy6HpnLj    [ raw code | output | fork ]

PHP, pasted on Oct 20:
1
2
3
4
5
6
7
8
<?php

$text = "Line1\nLine2\rLine3\r\nLine4";

$text = str_replace("\r", "\r\n", $text);
$text = str_replace("\n", "\r\n", $text);

var_dump($text);


Output:
1
2
3
4
5
6
7
string(30) "Line1
Line2

Line3


Line4"


Create a new paste based on this one


Comments: