Guest Posted July 19, 2005 Share Posted July 19, 2005 I need to find a way to look through a string and do the following: 1. Find each occurance of "keyword" 2. After each occurance of "keyword", find the very next occurance of "\n" 3. Replace those particular occurances of "\n" with some other text Any idea how to go about this? Link to comment Share on other sites More sharing options...
Guest Posted July 19, 2005 Share Posted July 19, 2005 I need to find a way to look through a string and do the following: 1. Find each occurance of "keyword" 2. After each occurance of "keyword", find the very next occurance of "\n" 3. Replace those particular occurances of "\n" with some other text Any idea how to go about this? <{POST_SNAPBACK}> http://www.php.net/manual/en/ref.strings.php Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.