php fpdf html,php - HTML/FPDF Table - Stack Overflow

I am working on printing this report to pdf:

NLfM3.png

But all I get is this:

jFjC3.png

In this report, every student has a record in the columns Exam, Progress Report, Quiz, and Project.

Example Data:

883555477e64c1983e6103616a99d509.png

Here is the part of my code:

while($row = mysql_fetch_assoc($sql_criteria)){

$criteria[] = $row['criteria'];

$pdf->SetFont('Arial','',9);

$pdf->Cell(35,5,$row['criteria'],1,'','C');

}

$pdf->Cell(35,5,'Grade',1,0,'C');

$pdf->Cell(35,5,'Remark',1,0,'C');

$pdf->SetFont('Arial','',9);

$pdf->Ln();

while($row = mysql_fetch_array($sql)){

$criteria_array = implode(" ", $criteria);

$query_rec = mysql_query("SELECT equivalent FROM tb_student_record WHERE instructor_id = '$inst_id' AND criteria = '$criteria_array' AND description = '$desc' AND subj_code = '$code' AND term = '$term'");

$record = mysql_fetch_array($query_rec);

$name = $row['stud_name'];

$course = $row['course_and_year'];

$pdf->SetFont('Arial','',9);

$pdf->Cell(1);

$pdf->Cell(40,4,$name,1);

$pdf->Cell(20,4,$course,1,0,'C');

$pdf->Cell(5,4,$record['equivalent'],1,0,'C');

$pdf->Ln();

}

So if there is any or something wrong with it kindly... Please point it out guys.. Any help will appreciated thanks in advance

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值