Wouldn't `$download['downloadlink'] = urlencode($download['downloadlink']);` be better?