function getLessonEvaluation($idCli, $idMob) { $lesson = new lesson(); $html = ""; $list_lesson_evaluation = $lesson->list_lesson_evaluation($idCli, $idMob); foreach ($list_lesson_evaluation as $item) { if (strlen($item['reason']) > 0) { $html .= '<label class="control-label">'; $html .= '<b>• Reason:</b> ' . $item['reason']; $html .= '</label>'; } else { if (strlen($item['rating']) > 0) { $html .= '<label class="control-label">'; $html .= '<b>• Rating:</b> ' . $item['rating']; $html .= '</label>'; } } $html .= '<label class="control-label">'; $html .= '<b>• Observations:</b>'; $html .= '</label>'; $html .= '<label class="control-label">'; $html .= $item['observations']; $html .= '</label>'; } echo $html; }