I have an array of the form array( 'paramName1'=>'param1', 'paramName2'=>'param2', ...) and want to turn it into a request string of the form paramName1=param1¶mName2=param2&...
It’s easy enough to write a function to do this myself, but I was wondering if php already had a function to do this built in?
Yes, and that is
http_build_query(). It’s only available in PHP 5 though so if you’re still using PHP 4 you’ll have to roll your own function.