Php fpdf多小区不显示值

Php fpdf多小区不显示值,php,fpdf,Php,Fpdf,我正在创建一个pdf,它正在工作,但值没有输入到pdf的多单元格中 以日期为例,用户输入日期,并在PDF上显示: Date: 26/01/2017 但这就是它现在的样子: Date: 下面是我的代码和日期示例: <?php //set the question values $questions = array( 'name' => "Name: ", 'date' => "Date: ", 'first' => "First Day of Leave: ",

我正在创建一个pdf,它正在工作,但值没有输入到pdf的多单元格中

以日期为例,用户输入日期,并在PDF上显示:

Date: 26/01/2017
但这就是它现在的样子:

Date:
下面是我的代码和日期示例:

<?php
//set the question values
$questions     = array(
'name' => "Name: ",
'date' => "Date: ",
'first' => "First Day of Leave: ",
'last' => "Last Day of Leave: ",
'days' => "Number of Days Taken: ",
'email' => "Managers Email: ",
'creditdays' => "Leave Days in Credit",
'personnel' => "THIS SECTION TO BE COMPLETED BY PERSONNEL DEPARTMENT",
'credit' => "Leave Days in Credit:",
'mansign' => "Signed:",
'date2' => "Date:",
'authorise' => "Authorised By:",
'date3' => "Date:",
'auth' => "Authorisation Of Leave"
);
//set the question answers
$date          = $_POST['date'];
$first         = $_POST['first'];
$last          = $_POST['last'];
$days          = $_POST['days'];
$email         = $_POST['email'];
$name          = $_POST['name'];
//set the question names
$questionName  = $questions['name'];
$questionDate  = $questions['date'];
$questionFirst = $questions['first'];
$questionLast  = $questions['last'];
$questionDays  = $questions['days'];
$questionEmail = $questions['email'];
$personnel = $questions['personnel'];
$credit = $questions['credit'];
$mansign = $questions['mansign'];
$date2 = $questions['date2'];
$authorise = $questions['authorise'];
$date3 = $questions['date3'];
$auth = $questions['auth'];
//Create the PDF

require('fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();

$pdf->SetFont('Arial', 'B', 16);
//insert fields
$pdf->SetDrawColor(100, 100, 100);
$pdf->SetFillColor(100,100,100);  
$pdf->Multicell(200, 3, "Leave Application Form", "", 'C');
$pdf->Ln();
$pdf->Ln();
$pdf->MultiCell(190, 10, $questionDate, $date, 'C');
根据:

在代码中时:

$pdf->MultiCell(190,10,$questionDate,$date,'C')

因此,
$date
不是要显示在单元格中的txt参数的一部分。 相反,您需要将$date变量附加到$questionDate变量

$pdf->MultiCell(190,10,$questionDate.$date,'C')

根据:

在代码中时:

$pdf->MultiCell(190,10,$questionDate,$date,'C')

因此,
$date
不是要显示在单元格中的txt参数的一部分。 相反,您需要将$date变量附加到$questionDate变量


$pdf->MultiCell(190,10,$questionDate.$date,'C')

$DATE$日期(不是逗号)[请参阅我的答案以便更好地理解]$questionDate$日期(不是逗号)[请参阅我的答案以获得更好的理解]有效!但是现在我的对齐方式“C”没有从左到右对齐?因为您首先需要将“border”参数的值传递给“align”参数,然后才传递给“align”参数。如果我的回答有助于您投票,请批准它。谢谢,太好了!你是主人,先生!谢谢你,我会记住的。我把你的答案标记为正确,并投票通过了(我没有足够的声誉,所以它没有显示出来,只是为了让你知道,先生)这是有效的!但是现在我的对齐方式“C”没有从左到右对齐?因为您首先需要将“border”参数的值传递给“align”参数,然后才传递给“align”参数。如果我的回答有助于您投票,请批准它。谢谢,太好了!你是主人,先生!谢谢你,我会记住的。我把你的答案标记为正确,并投票通过了(我没有足够的声誉,所以没有显示出来,只是想让你知道,先生)
MultiCell(float w, float h, string txt [, mixed border [, string align [, boolean fill]]])