/** * dibujar el número de los dientes dependiendo el inicio y fin de dientes * @param int $inicio * @param int $fin * @return string */ protected function dibujarNumeroDientes($inicio, $fin) { $html = ''; if ($inicio > $fin) { for ($i = $inicio; $i >= $fin; $i--) { if ($this->odontograma->diente($i)) { $html .= '<td>' . $this->odontograma->diente($i)->getNumero() . '</td>'; } } } else { for ($i = $inicio; $i <= $fin; $i++) { if ($this->odontograma->diente($i)) { $html .= '<td>' . $this->odontograma->diente($i)->getNumero() . '</td>'; } } } return $html; }