Results 1 to 3 of 3

Thread: Searching and replacing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    84

    Searching and replacing

    Hi guys

    I need a little help. I am working on a project for a friend. The program works like this. There is a text file that looks like this:

    Code:
    1234 = ABCD
    The user loads a php file in the program. The program searches the php file for terms that are on the left right of the equals sign. If it finds one then it is replaced with the term on the left side.

    Any help would be appreciated.

  2. #2
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: Searching and replacing

    If it finds one then it is replaced with the term on the left side.
    What is replaced? Are you saying, if the right side of the equals sign contains something then replace the left side of the equals sign with the right side in the text file?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    84

    Re: Searching and replacing

    Quote Originally Posted by ForumAccount View Post
    What is replaced? Are you saying, if the right side of the equals sign contains something then replace the left side of the equals sign with the right side in the text file?
    thanks for the quick response.

    once the php file is loaded it searches the php file. what is looking for in the php file is any term that is located on the right side of the equal sign. the text file looks like this. And say that while searching it finds text 2 in the php file, if it does it will replace it with text 1

    Code:
    text 1 = text 2
    text 3 = text 4
    
    etc...

Posting Permissions

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



Click Here to Expand Forum to Full Width