Non ti funziona perché str_replace() agisce sulle stringhe, non sugli array.
Che vorresti farci con str_replace()?