Replace acts on strings, not arrays. You'll need to loop through doing it to every element.