http_build_query instead of looping through params

http_build_query is easy to use and will url encode parameters that are sent