{ $w = array(20, 25, 30, 30, 50, 40); $this->SetFont('Arial', 'B', 12); for ($i = 0; $i < count($header); $i++) { $this->Cell($w[$i], 7, $header[$i], 1, 0, 'L'); } $this->ln(); for ($x = 0; $x < count($data); $x++) { if ($_POST["cmb_rol"] == $data[$x]['RolID'] || $_POST["cmb_rol"] == "") { $this->SetFont('Arial', '', 10); $this->Cell($w[0], 7, $data[$x]['Usuario'], 1, 0, 'L'); $this->Cell($w[1], 7, $data[$x]['Nombres'], 1, 0, 'L'); $this->Cell($w[2], 7, $data[$x]['Apellidos'], 1, 0, 'L'); $this->Cell($w[3], 7, $data[$x]['Sexo'], 1, 0, 'L'); $this->Cell($w[4], 7, $data[$x]['RolDesc'], 1, 0, 'L'); $this->ln(); } } $this->Ln(10); $this->SetFont('Arial', 'I', 8); $this->setX(20); $this->Cell(40, 10, 'Usuario: ' . $_SESSION["nombreUsuario"] . " (" . $_SESSION["rolNombre"] . ")", 0, 0, 'L'); } } $objC = new claUser(); $arregloCl = $objC->faListar(); $header = array('Usuario', ' Nombre', 'Apellido', 'Sexo', 'Rol'); $pdf = new PDF(); $pdf->AddPage(); $pdf->BasicTable($header, $arregloCl); $pdf->Output();