striping /n or /r
am 15.02.2006 19:03:11 von nikos
Hello list
Does anybody knows how to strip new lines (\n) or \r from a string?
I try
$lead=str_replace('(0x0D)',' ',str_replace('(0x0A)',' ',$lead));
or
$lead=str_replace('\n',' ',str_replace('\r',' ',$lead));
with no results
Thank you
Nikos
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: striping /n or /r
am 15.02.2006 19:04:29 von Micah Stevens
Use double quotes with \n and \r.
On Wednesday 15 February 2006 10:03 am, nikos gatsis wrote:
> Hello list
>
> Does anybody knows how to strip new lines (\n) or \r from a string?
> I try
> $lead=str_replace('(0x0D)',' ',str_replace('(0x0A)',' ',$lead));
>
> or
> $lead=str_replace('\n',' ',str_replace('\r',' ',$lead));
>
> with no results
>
> Thank you
> Nikos
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php