1. 甲型六氯环己烷
如下文所述,我通过一个阵列,根据最后的特性,即制造和开关,然后,我打造一个新阵列,并在这一新阵列中添加其最后特性,这样我就可以把这个新阵列和印刷起来,或重复这笔钱。
foreach ($answer as $value) {
$last=substr($value,-1);
$score=substr($value,-2,1);
switch($last){
case a:
$a=array();
array_push($a,$score);
break;
case b:
$b=array();
array_push($b,$score);
break;
}
}
In my html table I do this:
echo array_sum($a)
I can make it work if I add a digit like array_push($a, 2 ); but with the object it just overwrite the first one. what do I do wrong here?