Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php write()fpdf中的echo数据库_Php_Fpdf - Fatal编程技术网

Php write()fpdf中的echo数据库

Php write()fpdf中的echo数据库,php,fpdf,Php,Fpdf,如何在write()中回显学生姓名?谢谢尝试在字符串中使用“{$var}”: 例如: $con = mysqli_connect("localhost","root","","final_osa"); $sel_query="SELECT * FROM ched_scholars WHERE id = '".$_GET['id']."';"; $result = mysqli_query($con,$sel_query); while($row = mysqli_fetch_assoc($res

如何在write()中回显学生姓名?谢谢

尝试在字符串中使用“{$var}”:

例如:

$con = mysqli_connect("localhost","root","","final_osa");
$sel_query="SELECT * FROM ched_scholars WHERE id = '".$_GET['id']."';";
$result = mysqli_query($con,$sel_query);
while($row = mysqli_fetch_assoc($result)) {
$pdf->Write( 6, 'I, echo $row["student_name"];, of legal age and a resident of echo $row["present_address"]; understand that an Educational Scholarship/Financial Grants-in Aid has been awarded to me so that I may enroll in and complete the echo $row["course"];.' );
}
就你而言:

$myVar = "student";
$myString = "The {$myVar} are good.";

它不会打印学生的名字。它打印这一行“$row[“student_name”];”,您不能像这样在字符串中回音,您需要对其进行压缩<代码>'string'$变量更多字符串“可能重复感谢我终于做到了,他感谢你的帮助。我用过concatYep,看起来现在可以用了。
$con = mysqli_connect("localhost","root","","final_osa");
$sel_query="SELECT * FROM ched_scholars WHERE id = '".$_GET['id']."';";
$result = mysqli_query($con,$sel_query);
while($row = mysqli_fetch_assoc($result)) {
$pdf->Write( 6, 'I, {$row["student_name"]}, of legal age and a resident of {$row["present_address"]} understand that an Educational Scholarship/Financial Grants-in Aid has been awarded to me so that I may enroll in and complete the {$row["course"]}.' );
}