Replace explode/implode functions with a simple str_replace.