Hello,
I want to delete the newline character at the end of a string. I tested the following, without success.
str_replace("\n", "", $string);
preg_replace("/\n/", "", $string);
I know that a newline exists, because I tested it with strrpos($string, "\n");
Any solution to this problem? I wonder that there is no specific function in PHP, to delete the newline at the end of a string, like chomp() in Perl.
P.S.: I use PHP 4.0.3pl1 with Debian Linux 2.2.18pre21
TIA
Stefan Moeller, Germany