|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
need simliar function to nl2br
Hi,
I need a similar function to nl2br, but I need it to REMOVE the nl in the text rather than keep them and add in <br> as well. eg: my text has two lines, this is the first. This is the second. When I invoke nl2br on this text I get: my text has two lines, this is the first.<br> This is the second. But what I want is: my text has two lines, this is the first.<br>This is the second. This is because I'm generating a XML doc with php from a mysql db and loading it into Flash MX, and it treats a nl in the text as 2 <br>'s, so I get doouble spaces, any ideas ??? Thanks in advance, Jon |
|
#2
|
|||
|
|||
|
How about......
PHP Code:
Havn't tested it but I think it will do the trick. Baines |
|
#3
|
|||
|
|||
|
That's the ticket !
Hey man, thanks, you're a star ;-)
Cheers, Jon |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > need simliar function to nl2br |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|