将图像作为变量,然后使用FPDF和PHP插入它

So, I am new to fpdf. Maybe someone knows how to get an image with a variable and then insert it in a cell. There is something wrong with my sintax.

$image1 = "../_resources/img/xstampa/stampa_18_grey.png";

$stampanumero = $letterposition[$position].$image1;
$p->Cell(7, 5, $stampanumero, 1,'L');

The problem is that $image1 is printed as text ../_resources/img/xstampa/stampa_18_grey.png. It does not grab the image.

Try this way: So create image with

$p->Cell(7, 5,$p->Image('../_resources/img/xstampa/stampa_18_grey.png',10,10,-300), 1,'L');