<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ $iglesia = new Iglesia(); $club = new Club(); $labels = $iglesia->attributeNames(); $data = $iglesia->findAll(); $labels2 = $club->attributeNames(); $data2 = $club->findAll(); //var_dump($labels); //var_dump($data); $excel = Yii::app()->excel; //Crea una instancia foreach ($data2 as $campo) { $etiqueta = $campo->etiqueta; $nombre = $campo->nombre; } //var_dump($data2); foreach ($data as $c) { $igle = $c->nombre; $dis = $c->distrito; break; } $titulo = "INFORME MENSUAL"; $subtitulo = $etiqueta . ":" . $nombre; $ubicacion = "Iglesia: " . $igle . " Dto." . $dis; // $church = "Iglesia: ".$igle;