sniped22 Posted July 17, 2007 Share Posted July 17, 2007 I don't understand preg and i have been trying for quite some time. Is there a find and replace function that just takes parameters and does the work for you? for example: find_replace($strtofind, $strtoreplacewith); when parsing any text editor file (.txt, .php, etc) Thanks! Link to comment https://forums.phpfreaks.com/topic/60438-generic-find-and-replace/ Share on other sites More sharing options...
lightningstrike Posted July 17, 2007 Share Posted July 17, 2007 do you mean a function like str_replace($search,$replace,$string); ? Link to comment https://forums.phpfreaks.com/topic/60438-generic-find-and-replace/#findComment-300643 Share on other sites More sharing options...
paul2463 Posted July 17, 2007 Share Posted July 17, 2007 yes there is. have a look <a href="http://uk.php.net/str_replace">here at the manual for str_replace()</a> Link to comment https://forums.phpfreaks.com/topic/60438-generic-find-and-replace/#findComment-300645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.