关于二维数组。解决办法
程序员文章站
2024-02-02 09:01:46
...
关于二维数组。
';
';
?>
这样写为何不对?
------解决方案--------------------
';
';
$group1 = array(
("name"=>"zs","age"=>"10","sex"=>"nan"),
("name"=>"zs","age"=>"10","sex"=>"nan"),
("name"=>"zs","age"=>"10","sex"=>"nan"),
("name"=>"ls","age"=>"11","sex"=>"nan"),
("name"=>"ww","age"=>"12","sex"=>"nv"),
("name"=>"ls","age"=>"11","sex"=>"nan"),
("name"=>"ww","age"=>"12","sex"=>"nv"),
("name"=>"ls","age"=>"11","sex"=>"nan"),
("name"=>"ww","age"=>"12","sex"=>"nv")
);
echo '
{$col} | ';
?>
这样写为何不对?
------解决方案--------------------
$group = array(
array("name"=>"zs","age"=>"10","sex"=>"nan"),
array("name"=>"zs","age"=>"10","sex"=>"nan"),
array("name"=>"zs","age"=>"10","sex"=>"nan"),
array("name"=>"ls","age"=>"11","sex"=>"nan"),
array("name"=>"ww","age"=>"12","sex"=>"nv"),
array("name"=>"ls","age"=>"11","sex"=>"nan"),
array("name"=>"ww","age"=>"12","sex"=>"nv"),
array("name"=>"ls","age"=>"11","sex"=>"nan"),
array("name"=>"ww","age"=>"12","sex"=>"nv")
);
echo '
{$col} | ";
相关文章
相关视频