I need to replace multiple instances of a certain string (question mark) with strings from an array. e.g. if the string I wish to replace appears 3 times and my array has a
why not use
$retString = vsprintf('banana is %s, apple is %s, tomato is %s', $myArray); return $retString;