$post_data = array(
'model' => 'player',
'action' => 'buyItem',
'params' => array('item_id'=>100, 'count'=>100)
);
$postData = http_build_query($post_data);
echo $postData;
$post_data = array(
'model' => 'player',
'action' => 'buyItem',
'arams' => array('item_id'=>100, 'count'=>100)
);
$postData = http_build_query($post_data);
echo $postData;
the first output was model=player&action=buyItem¶ms%5Bitem_id%5D=100¶ms%5Bcount%5D=100. but the second output was right. so why can't I use params as the key? thanks!
arams, notparams. These arrays are similar, i cant reproduce your failure.