0
<?php while($row = mysqli_fetch_assoc($result): ?>
<div class="box">

    <h3><?php htmlspecialchars($row['testi_name'], ENT_QUOTES); ?></h3>
    <?php htmlspecialchars($row['testi_content'], ENT_QUOTES); ?>
</div>
<?php endwhile; ?>

I used : for my while loop but for some reason it display Parse error: syntax error, unexpected ':' May i know what causes this to happen?

Cherry
  • 5
  • 2

1 Answers1

0

You are missing a closing bracket after ($result), correct representation should be as below

<?php while($row = mysqli_fetch_assoc($result)): ?>
Tushar Gupta
  • 15,504
  • 1
  • 29
  • 47