php数组转化成url格式的方法

$array = array ( ‘id’ =123, ‘name’ = ‘dopost’ ); echo http_build_query( $array ); //得到结果id=123&name=dopost