PHP error - "}" Appears on page

Asked

Viewed 37 times

-2

I created a list in PHP, but for some reason "}" appears all the time a new data is added in the list, what I can do to remove this bracket?
Note: When I try to remove "}" from line 35 PHP returns me with this error

Parse error: syntax error, Unexpected end of file in C: Program Files (x86) Easyphp-Devserver-17 eds-www Sistema_aluno con_aluno.php on line 35

inserir a descrição da imagem aqui

PHP

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Con - Aluno</title>
<link rel="stylesheet" href="">
</head>
<body>
<table>
<tr>
<th>RM</th>
<th>Nome</th>
<th>Email</th>
<th>TurmaID</th>
</tr>
<?php
include_once("conexao.php");
$select = 'Select * from aluno order by Nome DESC';
$sql = mysqli_query($conn,$select);
$lista = 0;
while($dado = mysqli_fetch_array ($sql))
{
$lista++;?>
}
<tr>
<td><?php echo $dado['RM'];?></td>
<td><?php echo $dado['Nome'];?></td>
<td><?php echo $dado['Email'];?></td>
<td><?php echo $dado['Turma_ID'];?></td>
</tr>
<?php }?>
</table>

1 answer

1

Retire } below $lista++;>

Correct:

$lista = 0;
while($dado = mysqli_fetch_array ($sql))
{
$lista++;?>
<tr>
<td><?php echo $dado['RM'];?></td>
  • It worked! I made an extremely silly mistake, thanks for the help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.