Answers for "php remove new line from string"

PHP
7

undo local commit

$ git reset --soft HEAD~1
Posted by: Guest on April-09-2020
0

how remove \r\n from string in php

$text = preg_replace("/\r|\n/", "", $text);
Posted by: Guest on January-30-2021
1

php remove newline

//Replace the newline and carriage return characters
//using regex and preg_replace.
$text = preg_replace("/\r|\n/", "", $text);
Posted by: Guest on December-09-2020
1

php remove enter from string

$_result = trim(preg_replace('/\s+/', ' ', $original_text));
Posted by: Guest on April-28-2021
0

php remove \t and \n

$str = preg_replace('/(\v|\s)+/', ' ', $str);
Posted by: Guest on June-23-2021

Code answers related to "php remove new line from string"

Browse Popular Code Answers by Language