Ver Mensaje Individual
  #1  
Antiguo 03-01-2012
Holger Holger is offline
Registrado
NULL
 
Registrado: ene 2012
Posts: 3
Reputación: 0
Holger Va por buen camino
Array dentro de un Array

Estimados amigos estoy realizando algunos proyectos en php, para poder imprimir los reportes en PDF con ezpdf tengo un problema no he manejado mucho los arrays porfavor si alguien me puede ayudar...

Es un reporte de notas de los estudiantes de una primaria el codigo para diseñar la estructura el el siguiente:

Código PHP:
<?php
session_start
();
require_once(
'class.ezpdf.php');
include_once(
"../Class/Master.class.php");

$objStudent=new Student();
$cnsStudent=$objStudent->reportStudent($lvId,$prId);
                        
$objAvgCnt=new Notes();
                        
$cnsAvgCnt=$objAvgCnt->listMstHeadAvgCnt();

while(
$datAvg pg_fetch_assoc($cnsAvgCnt)) { 
$dataAvg[] = array_merge($datAvg);
}
                        
$con 0;
while(
$datatmp pg_fetch_assoc($cnsStudent)) { 
    
$con $con+1;
$data[] = array_merge($datatmp, array('num'=>$con));
}


$titles = array(
                
"num"=>"<b>ORDEN</b>",
                                
"alu_apellido"=>"<b>APELLIDOS</b>",
                                
"alu_nombre"=>"<b>NOMBRES</b>",
"Notas"=>array()
//aqui van un arreglo que tiene las notas de cada estudiante y deberia quedar asi:

Orden        Apellidos   Nombres            N1         N2        N3         N4         N5
1                   Caiza     Holger            18         20         15         17          20
he intentado con un while con un array y no consigo que me despliegue las 9 notas que tiene cada uno, [/color][/b][/color]el problema es que cuando denomino una variable como array no me despliega nada

Desde ya Agradesco por su tiempo y ayuda.
Código PHP:
 
Código PHP:
            );

$options = array(
                
"shadeCol"=>array(0.9,0.9,0.9),
                
"xOrientation"=>"center",
                
"width"=>500,
            );
$txttit "<b>JARDIN ESCUELA FISCAL MIXTA</b>\n";
$txttit.= "ANIO LECTIVO\n";
$txttit.= "Reportes de Notas: ".$anio."  ".$prl."\n";
$pdf->ezText($txttit12);
$pdf->ezImage("../img/esc.jpg"0420'none''left');
$pdf->ezTable($data$titles''$options);
$pdf->ezText("\n\n\n"10);
$pdf->ezText("<b>Fecha:</b> ".date("d/m/Y"), 10);
$pdf->ezText("<b>Hora:</b> ".date("H:i:s")."\n\n"10);
$pdf->ezStream();
?> 

Última edición por Casimiro Noteví fecha: 03-01-2012 a las 17:41:46.
Responder Con Cita