That's a very good point. I've never used implode much so it didn't come to mind while I was writing this snippet. I was also using the replacement code from the description first.

Thank you very much @WildcardSearch :)
Preparing a patch...