Boas pessoal,
Eu estou aqui com o problemazito com uma tabela.
O código da tabela é o seguinte:
Código (PHP):
A informação não aparece formatada na tabela.
Alguém pode ajudar?
Eu estou aqui com o problemazito com uma tabela.
O código da tabela é o seguinte:
Código (PHP):
<table style="width:100%">
<tr>
<th>ID</th>
<th>Titulo</th>
<th>Data</th>
<th>Hora</th>
</tr>
<?php[/b]
[b]include[/b]('../bd/init.php');
$sql = "SELECT id, titulo, Data, Hora FROM noticias WHERE Estado='Activa' ORDER BY Data DESC, Hora";
$executar = mysql_query($sql) [b]or die[/b](mysql_error());
[b]while [/b]($reg = mysql_fetch_array($executar)) {
[b]?>
<tr>
<td><a href="editar-noticias.php?id=<?php echo [/b]$reg['id']; [b]?>"><?php echo [/b]$reg['id']; [b]?></a></td>
<td><?php echo [/b]$reg['titulo']; [b]?></td>
<td><?php echo [/b]$reg['Data']; [b]?></td>
<td><?php echo [/b]$reg['Hora']; [b]?></td>
</tr>
<?php [/b]} [b]?>
</table>
<tr>
<th>ID</th>
<th>Titulo</th>
<th>Data</th>
<th>Hora</th>
</tr>
<?php[/b]
[b]include[/b]('../bd/init.php');
$sql = "SELECT id, titulo, Data, Hora FROM noticias WHERE Estado='Activa' ORDER BY Data DESC, Hora";
$executar = mysql_query($sql) [b]or die[/b](mysql_error());
[b]while [/b]($reg = mysql_fetch_array($executar)) {
[b]?>
<tr>
<td><a href="editar-noticias.php?id=<?php echo [/b]$reg['id']; [b]?>"><?php echo [/b]$reg['id']; [b]?></a></td>
<td><?php echo [/b]$reg['titulo']; [b]?></td>
<td><?php echo [/b]$reg['Data']; [b]?></td>
<td><?php echo [/b]$reg['Hora']; [b]?></td>
</tr>
<?php [/b]} [b]?>
</table>
A informação não aparece formatada na tabela.
Alguém pode ajudar?