/**
* @desc 多維數組轉化為支持curl提交數組
* @author 腳本之家
*/
public function toPost(array $params = array()
{
$result = array();
foreach ($params as $key => $val)
{
if (is_array($val))
{
$subPre = ($pre=="") ? $key : $pre
//$pre = "["
$result = array_merge($result
}
else
{
$result[$pre
}
} return $result;
}
From:http://tw.wingwit.com/Article/program/PHP/201311/21269.html