Reputation: 21
I come to you because I encounter a problem with my while loop
.
I did a while loop
to get the id of tickets and ticket titles.
Except that, I want to add a <br>
but it does not work, it does not move.
I tried with two <br> <br>
it's the same, can you help me please?
Here is my code :
<?php while ($row = $req_5->fetch()) { ?>
<a href="ticket.php?id=<?php echo $row['id_ticket']; ?>"><?php echo $row['titre']."<br><br>"; ?></a>
<?php } ?>
Upvotes: 0
Views: 59
Reputation: 8338
<?php while ($row = $req_5->fetch()) { ?>
<a href="ticket.php?id=<?php echo $row['id_ticket']; ?>"><?php echo $row['titre']?></a>
<br><br>
<?php } ?
just put the break tag outside of the anchor element
Upvotes: 1