delete based on input

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #16
    upon testing the script does what it should do. and may I remind you of what I said in post #2?

    Comment

    • angelicdevil
      New Member
      • Apr 2009
      • 116

      #17
      how do i get rid of linebreak?

      Comment

      • angelicdevil
        New Member
        • Apr 2009
        • 116

        #18
        but the linebreak is /> which is part of the script so if i use str replace wont it get rid of that too?

        Comment

        • angelicdevil
          New Member
          • Apr 2009
          • 116

          #19
          i have put the lines

          Code:
           $temp =str_replace("\r", "", $temp);
                      $temp =str_replace("\n", "", $temp);
          below line 21 to remove line break but it still doesn't delete the line that matches the entered value but instead it all in 1 line.

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #20
            but instead it all in 1 line.
            obviously, you remove every line break in the file (which doesn't matter from the XML-point-of-view).

            judging from my test you don't need to worry about the line breaks. but it still seems like overkill to do it this way.

            Comment

            • angelicdevil
              New Member
              • Apr 2009
              • 116

              #21
              but y isnt it overwriting cthe existig file properly

              Comment

              • angelicdevil
                New Member
                • Apr 2009
                • 116

                #22
                ol one thing when i echo back $start or $ end they r empty they r not echoing back anything y is tht so?

                Comment

                • angelicdevil
                  New Member
                  • Apr 2009
                  • 116

                  #23
                  how can i get php to trest < or > as string

                  Comment

                  • Dormilich
                    Recognized Expert Expert
                    • Aug 2008
                    • 8694

                    #24
                    for a change, try the functions mentioned in post #10.

                    Comment

                    Working...