Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/02/2016, 13:38
allamosash
 
Fecha de Ingreso: marzo-2015
Mensajes: 45
Antigüedad: 9 años, 1 mes
Puntos: 0
Respuesta: hacer llamado a un foreach desde controlador

CONTROLADOR:
Código PHP:
Ver original
  1. $data['contenido']=$this->mInventario->verRegistros('tbproductos');
  2. $this->load->view('miVista',$data)


VISTA:


Código PHP:
Ver original
  1. foreach ($contenido as $f)
  2.                     {
  3.                         echo"<tr>
  4.                                
  5.                                <td>" . $f->CodProducto . "</td>
  6.                                <td>" . $f->Descripcion . "</td>  
  7.                                <td>" . $f->Precio . "</td>
  8.                                <td>" . $f->Existencias . "</td>
  9.                             </tr>";
  10.                     }