为了清楚起见,这些变量和数组中的大多数都不是英语的,因此我将提供粗略的翻译,以便于阅读:
kontroliniai =测试(带有他们的学生姓名,然后是各种测试的等级) stipendija =学费 lankomumas =出勤率
好,所以我要实现的是根据条件解释数组中的成绩的方式更改学费值
但是当我至少希望它能输出全部三种学费时,我在整个页面上得到的只是80,反正这是代码:
数组:
changeColor()
数组解释器:
<?php
$mokiniai = array("Jonas" => array(
"AK" =>"30012075412",
"Vardas"=>"Jonas",
"Pavarde"=>"Jonelis",
"Ep"=>"JJonelis@gmail.com"),
"Jolanta"=> array(
"AK" =>"40011175612",
"Vardas"=>"Jolanta",
"Pavarde"=>"Joliene",
"Ep"=>"JoJoiene@gmail.com"),
"Dovydas"=> array(
"AK" =>"399011175692",
"Vardas"=>"Dovydas",
"Pavarde"=>"Pavardenis",
"Ep"=>"Dovadenis@gmail.com")
);
$kontroliniai = array("Jonas" => array(
"Matematika"=>9,
"Lietuviu"=> 5,
"Anglu"=>7),
"Jolanta"=> array(
"Matematika"=>10,
"Lietuviu"=> 7,
"Anglu"=>7 ),
"Dovydas"=> array(
"Matematika"=>6,
"Lietuviu"=> 8,
"Anglu"=>10)
);
$lankomumas = array("Jonas" => array(
"praleista pam :"=>5),
"Jolanta"=> array(
"praleista pam :"=>2 ),
"Dovydas"=> array(
"praleista pam :"=>6 )
);