wee493 Posted November 14, 2009 Share Posted November 14, 2009 Currently I have a large string of html stored in a variable. Within the html is some images.I'm using preg_replace to find all the images $content = preg_replace('~'.$site.'(\S+\.(?:jpe?g|png|gif))~i', "$1",$content); I'm wanting to run a function on every image to cache it locally. So I need to run a function on each string preg_replace picks out. How do i do this? Link to comment https://forums.phpfreaks.com/topic/181483-run-function-on-parts-of-text-string/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.