Answers for "replace some text at the end of the string php"

PHP
5

php replace return character

$string = str_replace("\n", "", $string);
$string = str_replace("\r", "", $string);
Posted by: Guest on May-14-2020
0

replace exact word in php

$string = preg_replace('/\bthe\b/', '', $string);
Posted by: Guest on May-13-2021

Code answers related to "replace some text at the end of the string php"

Browse Popular Code Answers by Language