我是Codeigniter的新手,我需要向所有当天缺席的学生家长手机号码发送短信,格式为“亲爱的父母,今天您的”学生姓名”不存在。学生姓名是出现在数组中。如何一一检索它们并将其名称发送给各自的父母?
$name=array();
foreach($Result as $row) {
$students[] = $row['student_id'];
if($row['student_parent_phone']!="")
$mobile[] = $row['student_parent_phone'];
if($row['student_name']!="")
$name[] = $row['student_name'];
}
return array( 'students'=>$students, 'mobile'=>$mobile, 'name'=>$name );