Re: Replacing 2 strings

From: Date: Mon, 30 May 2005 13:43:15 +0000
Subject: Re: Replacing 2 strings
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-215991@lists.php.net to get a copy of this message
On 30/05/05, Brian V Bonini <b-bonini@cox.net> wrote: > On Sun, 2005-05-29 at 12:22, W Luke wrote: > > Hi, > > > > I have some text in a file which, when it's dumped to a var, needs to > > be replaced. In its raw form, it looks like this: <^JIM_JONES> and I > > need to remove the <^_ and > characters and have it read "Jim-Jones" > > > > It's nestled in amongst a load of other text - I'm fopen'ing a file > > and reading it line by line - the text-to-replace is just in a var > > named $text1 > Someone much more clever that I can probably come up with something much > cleaner and efficient but.... This works... Thanks Brian, that worked a treat. Altered it slightly, but essentially it was just what I needed. Lifesaver, thanks. -- Will The Corridor of Uncertainty http://www.cricket.mailliw.com/ - Sanity is a madness put to good use -

« previous php.general (#215991) next »