<?php ini_set('display_errors', 1); error_reporting(E_ALL); include_once 'head.php'; $pro = new Proyecto(); $proyectos = $pro->getAll(); foreach ($proyectos as $proyecto) { echo "<h1 class='home'><a href='./'>" . $proyecto['nombre'] . "</a></h1>"; $tarea = new Tarea(); $tareas = $tarea->getByProyecto($proyecto['id']); ?> <a id="new_tarea_btn" href="nueva_tarea.php?id_proyecto=<?php echo $proyecto['id']; ?> " class="fancybox"><i class="fa fa-plus"> Nueva tarea</i></a> <table id="tablatareas" class="tabla_tareas"> <tr> <?php foreach ($tarea->campos as $c => $nombre) { echo "<th>" . $nombre . "</th>"; } ?> <th>Tiempo dedicado</th> <th>Opciones</th> </tr> <?php foreach ($tareas as $t) { $toshow = ""; echo "<tr id='linea_" . $t['id'] . "'>"; foreach ($tarea->campos as $c => $nombre) {