Element not inserting correctly in HTML code [duplicate]

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

I have an issue that I never seen before. It is basic HTML though, I can’t wrap my head around why it doesn’t work.

Here is the code in my editor:

<table>
<thead>
<tr>
<td>ID</td>
<td>Prénom</td>
<td>Nom</td>
<td>Email</td>
</tr>
</thead>

<tbody>
<!– $allUsers is an array with a length of 13 –>
<?php foreach($allUsers as $user):?>
<tr>
<td class=”id-row”><?= $user[‘id’]; ?></td>
<div class=”infos”>
<td class=”fn-row”><?= $user[‘firstname’]; ?></td>
<td class=”ln-row”><?= $user[‘lastname’]; ?></td>
<td class=”mail-row”><?= $auser[’email’]; ?></td>
</div>
<td class=”link-row”><a href=”lireUser?id=<?= $user[‘id’]?>”>Lire</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>

And here is what comes out in the final page:
As expected, there are 13 occurences of the .infos div

I really don’t see why this happens… The <div> should encapsulate the three <tr> but, as seen in the picture, they all get generated empty at the start, before the table

‫أضف إجابة

تصفح
تصفح

مجهول يجيب