And this is the code.
<body>
<br>
<div class="card">
<?php
while($row=mysqli_fetch_assoc($result))
{
echo '<div class="card-header">';
echo '<h5 class="mb-0">';
echo '<button class="btn btn-link" type="button" data-toggle="collapse"
aria-expanded="true" aria-controls="collapseOne">';
echo $row['title'];
echo '</button>';
echo '</h5>';
echo '</div>';
echo '</div>';
}
?>
</div>
</body>
but now it display the second record with one collapse title, it must dispaly two title with two collapse title.
Place the main card div within your while loop:
<body>
<br>
<?php
while($row=mysqli_fetch_assoc($result))
{
echo '<div class="card">';
echo '<div class="card-header">';
echo '<h5 class="mb-0">';
echo '<button class="btn btn-link" type="button" data-toggle="collapse"
aria-expanded="true" aria-controls="collapseOne">';
echo $row['title'];
echo '</button>';
echo '</h5>';
echo '</div>';
echo '</div>';
}
?>
</body>