That's because $fila['imagen1'] is empty in some instances.
It works when you place it in the "...php if(!empty..." block because that code would only run when $fila['imagen1'] is not empty.
If you place your display code before the "...foreach ($data->result_array() as $fila)..." then it won't work because $fila hasn't been created yet.
__________________
112.020.756
|