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

墨蓝 2022-10-07 00:43 262阅读 0赞

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 条评论,262人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Stack Overflow 食用指南

    一. 前言   Stack Overflow(SO)网站是很多同学日常工作、学习都会使用的网站,在上面可以方便的搜索到很多问题及解决方案。但是这仅仅只能满足部分需要,也只

    相关 VC中栈溢出/Stack overflow怎么办?

    图像处理开发资料、图像处理开发需求、图像处理接私活挣零花钱,可以搜索公众号"qxsf321",并关注! 图像处理开发资料、图像处理开发需求、图像处理接私活挣零花钱,可以搜索