//index.html
<html>
<body>
<form action="testajax.php" method="post">
<input name="sub[name]" value="ymy">
<input name="sub[nu]" value="39">
<input type="submit" value="test">
</form>
</body>
</html>
//testajax.php
<?php
$sub = $_POST['sub'];
var_dump($sub);die();
?>
输出:
array(2) { ["name"]=> string(3) "ymy" ["nu"]=> string(2) "39" }