修改考号数据模型和班级名
This commit is contained in:
1 parent
7ab859aa76
commit
d36934d333
12 files changed
+314
-97
No files matched your search
@@ -340,6 +340,31 @@ function subjectList()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 把request到的参数转换成数组,并删除空值
|
||||
*
|
||||
* @access public
|
||||
* @param str或array $str 表单中获取的参数
|
||||
* @return array 返回类型
|
||||
*/
|
||||
function strToarray($str)
|
||||
{
|
||||
// 如果str是字符串,则转换成数组
|
||||
if(is_array($str)==false)
|
||||
{
|
||||
$str = explode(',', $str);
|
||||
}
|
||||
// 循环数组,删除空元素
|
||||
foreach ($str as $key => $value) {
|
||||
if($value == "" && $value == null){
|
||||
unset($str[$key]);
|
||||
}
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user