function test(){ $pa['type'] = 'alipay'; $pa['num'] = 2; echo http_build_query($pa);}
调用方法后生成的字符串为
type=alipay&num=2