array("Maths"=>"0","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0") );现在我想在后"/> array("Maths"=>"0","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0") );现在我想在后">
PHP 二维数组追加赋值问题~~~~~~~~~
我有一个学生名字和成绩的数组
<br />$etudiants=array("AAA"=>array("Maths"=>"0","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0")<br /> );<br />
<br />"BBB"=>array("Maths"=>"1","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0")<br />
$etudiants=array(
"AAA"=>array("Maths"=>"0","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0"),<br />"BBB"=>array("Maths"=>"1","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0")<br /> );
<br />$etudiants["BBB"] = array("Maths"=>"1","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0");<br />
<br />$etudiants = array("AAA"=>array("Maths"=>"0","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0"));<br />$additional = array("BBB"=>array("Maths"=>"1","Francais"=>"0","Anglais"=>"0","Histoire-Geographie"=>"0","Sport"=>"0"));<br />$cards = array_merge($etudiants, $additional); <br />print "<pre class="brush:php;toolbar:false">";<br />print_r($cards); <br />