重构查询

This commit is contained in:
win10 committed 2020-07-10 16:29:25 +08:00
1 parent bb631a3643
commit 8f5784917c
73 files changed
+2634 -371

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
<?php
declare (strict_types = 1);
namespace app\zhengli\model;
class Index
{
// 将关联学生成绩转换成以学科列名为key得分为value的数组
public function subjectChengjiKeyAndValue($array = array())
{
$arr = array();
foreach ($array as $key => $value) {
$array[$value->subjectName->lieming] = $value;
unset($array[$key]);
}
return $array;
}
}