Ok I know the title is a bit confusing as I can't think of a good way to explain it. There is this function which I don't have access to and it looks something like this:
<?php function myFunction() {
?> '<img src="one.jpg" />';
<?php } ?>
Ok so everytime that function is called, it echo's the img tag. But what if I want to manipulate the img tag before it echos to the screen? Is it possible?
I want to assign it to a variable first, manipulate it and then I will echo it out. Something like this:
$image_src = myFunction();
$image_src = preg_replace('/s.*"/', $image_src);
echo $image_src;
Something like this possible?