For some reason I'm struggling with this.
I have the following 2 arrays and I need to take the array values from the $img array and insert them in order into the $text array, appending/replacing the %img_ tags, like so:
$text = array(
0 => "Bunch of text %img_ %img_: Some more text blabla %img_",
1 => "More text %img_ blabla %img_"
);
$img = array("BLACK","GREEN","BLUE", "RED", "PINK");
I want my $text array to end up like so:
$text = array(
0 => "Bunch of text %img_BLACK %img_GREEN: Some moretext blabla %img_BLUE",
1 => "More text %img_RED blabla %img_PINK"
);
NOTE: The number of items in the $img array will vary but will always be the same as the number of %img_ in the $text array.