Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Replacing
with newline

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30774
    mbarandao
    Member

    I have a textarea box which displays information from mysql. My problem is that all
    characters are not translating into actual new line. Instead, the output inside the textarea is as follows:

     
    On 11/21/10 @ 10:11
    We performed the following:

    test

    ----End of Service Report----

    On 11/19/10 @ 04:11
    We performed the following:

    Information updated

    ----End of Service Report----

    On 11/19/10 @ 04:11
    We performed the following:

    Information updated

    ----End of Service Report----


    On 11/19/10 @ 04:11
    We performed the following:

    Information updated

    ----End of Service Report----


    Every instance of the


    should actually be a newline. It there any thoughts on how to replace


    with newline?

    Mossa

    #72776
    Rob MacKay
    Participant

    This will replace a br with n – n will work in a string if you use ” instead of ‘ – else you might have to concatenate it in… but give it a go anyway :D

    $string = preg_replace('/
    /', 'n', $string);
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.