[eluser]TheFuzzy0ne[/eluser]
Are you wanting to apply str_replace() to every post? If you want to use str_replace() on each entry, you'll need to loop through the array, or you can do it at the database level with REPLACE(). In any case, I would suggest that you do it in your model, rather than your controller.
However, I'm not quite sure what you're trying to achieve. Are you sure that your posts contain two consectutive whitespaces?