I have this PHP code:
for($x = 0; $x < count($obrazy); $x++)
{
$mail->AddEmbeddedImage($obrazy[$x], 'tel'.$x);
}
the variable "obrazy" is a table storing path (link to the image) e.g. "obraz/zdjecie.png". I need to do this with a loop because the array of obrazy can have a different size each time. The above loop does not work for me, because when I want to show this image in the mail, nothing is displayed.
$iterator = 0;
while ($row = mysqli_fetch_array($rezultat))
{
$mail->Body = $mail->Body.'//..........
<img src="cid:tel'.$iterator.'" style="
width: 160px;
display: block;
float: left;
"/> //..........
';
$iterator++;
}
"// ......" means another part of the code that does not matter to the question being asked. The while loop must be because I extract different data from the database. Everything works only the images do not want to be displayed in the email, even if instead of "$iterator" I enter the number. Links to the image contained in the table are RELIABLE for the PHP file.