我正在为我的pdf问题寻找解决方案。我正在从mysql数据库向我的pdf中插入一个值,但问题是这个值不是越界而是越过单元格。
以下是片段:
include 'restaurantconnect.php';
$count=0;
$sql="SELECT * FROM `restaurant`";
$result = $conn->query($sql);
while($inventory = $result->fetch_assoc()){
$concat = $inventory['first_name'] . " " . $inventory['last_name'];
$pdf->Cell(25,5,"{$inventory['food_id']}",1,0,"R");
$pdf->Cell(50,5,"{$concat}",1,0,"C");
$pdf->Cell(20,5,"{$inventory['package']}",1,0,"L");
$pdf->Cell(100,5,"{$inventory['orders']}",1,0,"L");
$pdf->Cell(70,5,"{$inventory['addons']}",1,1,"L");
我订单上的值来自mysql数据库 rice,pork,seafood,vegetables, desserts
pdf中显示的是这样的
food_id | concat | package | orders | addons
1 | John | 1 | rice, seafood vegetables, desserts | extras
我想发生的是
food_id | concat | package | orders | addons
1 | John | 1 | rice,se| extra
afood,ve
getables
暂无答案!
目前还没有任何答案,快来回答吧!