[PHP] replacing everything between 2 strings

2003-07-21 Thread Matt Palermo
Is there a way to replace everything between 2 given strings if it exists? Say I have: $str = replace anything and everything in here.; Now I want to replace everything between the word replace and here., so the new string could read something like this: $str = replace NOTHING here.; So

RE: [PHP] replacing everything between 2 strings

2003-07-21 Thread Daryl Meese
-Original Message- From: Matt Palermo [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 6:52 PM To: [EMAIL PROTECTED] Subject: [PHP] replacing everything between 2 strings Is there a way to replace everything between 2 given strings if it exists? Say I have: $str = replace anything

RE: [PHP] replacing everything between 2 strings

2003-07-21 Thread Matt Palermo
To: Matt Palermo; [EMAIL PROTECTED] Subject: RE: [PHP] replacing everything between 2 strings look into opendir and readdir with opendir you can open a handle to a directory and use readdir in a loop to look at every file (fopen or whatever to load each file) then parse your files. readdir may help you

Re: [PHP] replacing everything between 2 strings

2003-07-21 Thread Curt Zirzow
* Thus wrote Matt Palermo ([EMAIL PROTECTED]): Is there a way to replace everything between 2 given strings if it exists? Say I have: $str = replace anything and everything in here.; Now I want to replace everything between the word replace and here., so the new string could read