/** * Executes index action * * @param sfRequest $request A request object */ public function executeAprobados(sfWebRequest $request) { $aprobados = ResultadosPeer::getCantAprobados(); $salida = null; foreach ($aprobados as $suma) { $salida .= '<tr> <td>' . $suma['titulo'] . '</td> <td>' . $suma['cantidad'] . '</td> </tr>'; } // Set some content to print $html = <<<EOD <style type="text/css"> table { width: 635px; border: 0; background-color: #00CCFF; color: #000000; } </style> <table> <thead> <tr> <th scope="col">Test</th> <th scope="col">Cantidad de aspirantes</th> </tr> </thead> <tbody> {$salida} </tbody> </table> EOD; $this->generarTabla($html); }