Hi!
I'm trying to make a simple php script to find all src attributes from all images in a html text and then replace all found srcs with some text after making some conditional changes.
Something like this:
@preg_match_all('/<img\s src="([a-zA-Z0-9\.;:\/\?&=_|\r|\n]{1,})"/isxmU', $body, $images);
now i've all srcs into the $images variable, now i make:
foreach ($images as $img) {
..my changes here..
}
and now... how can i restore the changed srcs to the $body variable again??
many thanks in advance,