Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
I don't know what you exactly want to do, but perhaps you could use this:
Code: Select all
this will simply change a complete string.
as far as I know "\r\n" works normally in an textarea, so you won't have to replace those when creating a form.
You will only need to replace them when you're placing the code outside input fields in you're html-page. But than I allways manage with str_replace.
Hope this helps
To display a new line in a text area you need to use the html code for a new line character which is
By the way, it's advisable not to use regular expression functions for such basic tasks as converting set characters without pattern matching, because it takes up server strain. The str_replace() function is far more effective at this
- Last Samuray
- Posts: 824
- Joined: Sun Jun 02, 2002 3:09 am
or you can do...
Pejone wrote:or you can do...
But that won't work because the textarea displays <br> as <br> and not new lines. You have to use
for a new line in a text area
Who is online
Users browsing this forum: No registered users and 6 guests