I am building add to card codes with php mailer.
I am creating send shopping cart items with email. There are in mail body five foreach array, i need create one table in there but table rows can not correct, how can I fix it?
$mail->Body = "<div class='container-fullwidth'>
<h2>Sipariş Özeti</h2>
<hr>
<div class='table-responsive'>
<table width='100%' class='table table-striped'>
<thead>
<tr>
<th><h2>Ürün</h2></th>
<th><h2>Gramaj</h2></th>
<th><h2>Adet</h2></th>
<th><h2>Birim Fiyat</h2></th>
<th><h2>Birim Tutar</h2></th>
</tr>
</thead>
<tbody>";
$mail->Body .= "<tr align='left'>";
foreach ($urun_adi as $urun) {
$mail->Body .= "<td bgcolor='#f0f8ff'><h2>$urun</h2></td>";
}
foreach ($gramaj_adetler as $gramaj_adet) {
$mail->Body .= "<td bgcolor='#f0f8ff'><h2>$gramaj_adet</h2></td>";
}
foreach ($toplamadet as $toplamA) {
$mail->Body .= "<td bgcolor='#f0f8ff'><h2>$toplamA</h2></td>";
}
foreach ($trBirimfiyat as $trBirimF) {
$mail->Body .= "<td bgcolor='#f0f8ff'><h2>$trBirimF</h2></td>";
}
foreach ($trBirimtutar as $trBirimT) {
$mail->Body .= "<td bgcolor='#f0f8ff'><h2>$trBirimT</h2></td>";
}a
$mail->Body .= "</tr>";
$mail->Body .= "</tbody></table></div></div>"; //close table
echo "</tr></thead><tbody><tr>";