This question already has an answer here:
So here is my code but I am getting "Parse error: syntax error, unexpected '}', expecting the end of file in C:\xampp\htdocs\Mat\index.php on line 53", I have no clue why anyone can help, please?
<?php
$connect = mysqli_connect('localhost','root','root123','font');
$query = 'SELECT * FROM pens order by id ASC';
$result = mysqli_query($connect, $query);
if($result):
if(mysqli_num_rows($result)>0):
while($product = mysqli_fetch_assoc($result)):
?>
<div class="col-lg-12">
<div class="row">
<form method="post" action="index.php?action=add&id=<?php echo product['id']; ?>">
<div class="product">
<div class="col-lg-2">
<h4>FONT <?php echo product['id']; ?></h4>
</div>
<div class="col-lg-8 <?php echo strtok(product['name'], " "); ?>">
</div>
<div class="col-lg-2">
</div>
</div>
</form>
</div>
</div>
<?php endwhile; endif; endif; ?>
</div>