Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/265.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 TCPDF:multicell内部的更多图像_Php_Image_Tcpdf - Fatal编程技术网

Php TCPDF:multicell内部的更多图像

Php TCPDF:multicell内部的更多图像,php,image,tcpdf,Php,Image,Tcpdf,是否可以在TCPDF中的多单元中放置多个图像? 我尝试使用以下代码: $imgArray = array(); for ($i = 0; $i < 4; $i++) { $imgArray[] = $pdf->Image(IMGS . 'nd.jpg', '', '', 39, 40); } $pdf->MultiCell($wLeft, $hRows, implode($imgArray), 0, 'L', FALSE, 0, '', '', TRUE); $img

是否可以在TCPDF中的多单元中放置多个图像? 我尝试使用以下代码:

$imgArray = array();
for ($i = 0; $i < 4; $i++) {
    $imgArray[] = $pdf->Image(IMGS . 'nd.jpg', '', '', 39, 40);
}
$pdf->MultiCell($wLeft, $hRows, implode($imgArray), 0, 'L', FALSE, 0, '', '', TRUE);
$imgArray=array();
对于($i=0;$i<4;$i++){
$imgaray[]=$pdf->Image(IMGS'nd.jpg','',39,40);
}
$pdf->MultiCell($wLeft,$hRows,内爆($imgArray),0,'L',FALSE,0,','',TRUE);
但我只看到一张图片,图片顶部有三个零。 我在网上没有找到任何例子

您可以像这样使用和
标记:

在本例中,使用
$i
设置水平(x)位置。 如果图像宽度为39,则每个图像将并排显示

for ($i = 0; $i < 4; $i++) 
    $imgs .= '<img src="'.IMGS.'nd.jpg"/>';

$pdf->writeHTMLCell(170, null, 10, 10, $imgs."\n");
for ($i = 0; $i < 4; $i++) {
    $pdf->Image(IMGS . 'nd.jpg', ($i * 39), 10, 39, 40);