http_build_query putting strange chars in query string
问题 I'm using cURL to submit a form and to do that I'm using PHP's http_build_query() to form a query string. I was wondering why the form didn't submit and then I echoed out the query string only to find a '¶' and a 'ð` in the query string. $post_data = array('terms' => 'true', 'ethnicity' => 0, 'param0' => 'Lance', 'param1' => 'Newman'); $post_data = http_build_query($post_data); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); echo $post_data; Returns