Answers for "how to remove new line from string in php"

PHP
43

undo commit

# KEEP CHANGES
git reset --soft HEAD~1

# REMOVE CHANGES
git reset --hard HEAD~1
Posted by: Guest on April-07-2020
0

remove last commit from remote

git push origin +HEAD^:<name of your branch, most likely 'master'>
Posted by: Guest on October-25-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

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

Browse Popular Code Answers by Language