我知道现在有点晚了,但你可以这样做:functionAddToArray($post_information){
//Createthereturnarray
$return=array();
//Iteratethroughthearraypassed
foreach($post_informationas$key=>$value){
//Appendthekeyandvaluetothearray,e.g.
//$_POST['keys']="values"wouldbeinthearrayas"keys"=>"values"
$return[$key]=$value;
}
//Returnthecreatedarray
return$return;}
试验包括:if(isset($_POST['submit'])){
var_dump(AddToArray($_POST));}
这是为我制作的:array(size=1)
0=>
array(size=5)
'stake'=>string'0'(length=1)
'odds'=>string''(length=0)
'ew'=>string'false'(length=5)
'ew_deduction'=>string''(length=0)
'submit'=>string'Open'(length=4)