我正在尝试像一侧一样划分页面,应该有关于用户的信息,例如姓名,电子邮件,地址,手机,并且在此之前,我要用户的图像。 您可以检查需要的图像 Blue box is image of the user
这是获取此信息的循环
$tcpdf = new TCPDF();
$tcpdf->AddPage();
//----->User<-----\\
$tcpdf->SetFont('times', '', 10.5);
$displayed=false;
$useroutput[]='<table>';
foreach($row3 as $key11=>$value11)
{
$useroutput[]='<tr>';
$useroutput[]='<td>'.$key11.':'.$value11. '</td>';
$useroutput[]='</tr>';
}
$useroutput[]='</table>';
$user=join($useroutput);
$tcpdf->writeHTML($user, true, false, false, false, '');
$tcpdf->Output();
答案 0 :(得分:0)
在html / css中
#parent {
display: flex;
}
#left {
width: 300px;
margin-left: 5px;
}
#right {
flex: 1;
border:solid;
}
ul {list-style: none;}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
<div id="parent">
<div id="left"><ul>
<li>Id:</li>
<li>Name:</li>
<li>Address:</li>
<li>Email:</li>
</ul>
</div>
<div id="right"><img src="https://www.google.org/static/logo_googledotorg.svg"></img></div>
</div>
<table style="width:100%">
<tr>
<th>id</th>
<th>name</th>
<th>quanity</th>
<th>price</th>
<th>address</th>
<th>status</th>
</tr>
<tr>
<td>1</td>
<td>Apple</td>
<td>12</td>
<td>17500</td>
<td>@mandi</td>
<td>fresh</td>
</tr>
<tr>
<td>2</td>
<td>Banana</td>
<td>3000</td>
</tr>
</table>