Page 1 of 1

Removing blank spaces in textarea

Posted: Mon Jun 27, 2005 10:43 am
by srirams
Hi,

I want to remove blank lines in a text area. That is when I submit a form if he enters a enter in the text area, it comes as a blank text. I want remove this black line.

Warne is the best.
Murli comes second.

should come as warne is the best and murli is the second.

Regards

Posted: Mon Jun 27, 2005 11:23 am
by ol4pr0
try this

Code: Select all

echo str_replace("\n", " ", $string);