Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2011
    Thanked 0 Times in 0 Posts

    How to replace a charater from end a multiline text using php ?

    Hi All,

    I have a multi line text , i want to remove the '=' sign and space at the end of the each line. How can i remove that '=' sign , there is no \n or <br> to check the new line .
    How can be done this using php.If anyone knows please help me.. Thanks in advance..

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
    <html xmlns=3D"http://www.w3.org/1999/xhtml">
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8" />
    <title>title here</title>

    <table width=3D"650" border=3D"1" cellpadding=3D"0" cellspacing=3D"0" align=
    <tr> <td>

    <table width=3D"650" border=3D"0" cellpadding=3D"0" cellspacing=3D"0" align=
    <td colspan=3D"3">
    <a href=3D"http://e.ccialerts.com/a/hBNCRBwB8N6AvB8WQuONhRMu1Sp/cnyb8a"><im=
    g src=3D"http://f.chtah.com/i/10/2084020271/12.15.10_book_header.gif" width=
    =3D"650" height=3D"300" alt=3D"Subscribe to Business for=
    =03 only $29.95 and get the Lists=03with your paid subscript=
    ion! " border=3D"0"></a></td>

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Thanked 48 Times in 48 Posts
    Probably could be done with regex, but I'm hopeless with that. There's also 3D showing after every = that is supposed to be there

    eg: <html xmlns=3D"http://www.w3.org/1999/xhtml">

  • #3
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Behind the Wall
    Thanked 372 Times in 368 Posts
    if there's no \n or <br>, how do you know it's a line end.

    PS. please do not cross-post
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts