How can i remove '=' sign and white space from end of a each line in a multiline text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mohan lal
    New Member
    • Mar 2011
    • 25

    How can i remove '=' sign and white space from end of a each line in a multiline text

    Hi there,

    I have a text like
    $line=`line1=
    line2=
    line3=`;

    it shows in browser like line1= line2= line3= . I want to remove the = sign and the extra space from the text. How can i remove it? if anyone knows please help me. I wish to display the output in browser like line1line2line3 . Thanks in advance,,
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    you can use str_replace() to remove those two characters.

    Comment

    • mohan lal
      New Member
      • Mar 2011
      • 25

      #3
      Thanks Dormilich,

      I have fixed the issue by using preg_replace , thank you very much for your information

      Comment

      Working...