You need to escape special characters which have meaning within regular expressions, also you are not actually building an array here, so no need to seperate each character with a comma. So I think this should cover it:
Though I would have to ask, won't the replacement butcher the url? Would you not be able to just use rawurlencode() [php.net] or urlencode() [php.net] instead?