Possible Duplicate:
PHP str_replace with for loop from array
How to replace a string (#stringA#) with elements from an array?... let's say we've a text:
'My shoes are #stringA# but #stringA#'
(the same string - #stringA#)
with $array:
$array[0] = 'comfy';
$array[1] = 'smells horrible';
so it'll be equal to 'My shoes are ' . $array[0] . ' but ' . $array[1];
- My shoes are comfy but smells horrible?