Forum Moderators: coopster
i have a form with a textarea field and when a user enters details i use the $_POST['address'] to get the value of it, but the problem is that if the user enters line spaces (by pressing enter) then i get the spaces in my variable. Can someone please tell me how i can remove all line spaces and replace it with <br> instead?
thanx
123 Testing Road
Testing
Testing
i want to know how i can remove all the line spaces and put <br> there instead so it reads:
123 Testing Road<br>Testing<br>Testing
123 Testing Road
<br />
Testing
<br />
Testing
as apposed to getting the original which is:
123 Testing Road
Testing
Testing
but what i really need to do is remove all those line breaks and put everything on one line so it looks like this:
123 Testing Road <br />Testing <br />Testing
Thanx
thanx