Hi, i have this code which is a table with login form, history of website and the news.

ths news are here:

<td>
	<h2>DESTAQUES</h2>
	<table>
		<tr>
			<td>
				<?PHP
					include "db_connect.php";

					$sql_destaque = "SELECT data_destaque, descricao_destaque FROM destaques ORDER BY cod_destaque DESC LIMIT 4";
					$executa=mysql_query($sql_destaque,$connect);

					$dados = array();
					while ($linha = mysql_fetch_array($executa)) $dados[] = $linha;
					mysql_free_result($executa);


					function add_imglink($linha) 
					{
						echo '<td width="5%" align="left">';
						echo $linha['data_destaque']."<br/>".$linha['descricao_destaque']; 
						echo '</td>';
					}


					define('NUMERO_LINHAS', 1);
					echo '<table width = 5%  height = 45% align = center>';
					echo '<ul> <li>';
					for ($i = 0; $i < count($dados); $i += NUMERO_LINHAS) 
					{
						echo '<tr>';
				
						for ($lin = 0; $lin < NUMERO_LINHAS; $lin++) 
						{
							if ($i + $lin < count($dados)) add_imglink($dados[$i + $lin]);
						}
					echo '</li> </ul> ';
						echo '</tr>';
					}	
					echo '</table>';
				?>
</td>


</tr>
</table>

But i can't do the unordered list as i want. Or some <br/> so i can seperate the news for each other.

Can someone help me?

Thank You,
PF2G

I do not know whether this is the cause for your trouble but there are two issues:
1. you start a table row within a list item (<li>) and end it outside the list item; html tags should be nested appropriately
2. putting a table (even if properly nested) within a list item might be valid but a bad idea (unless this is really really what you intended); things might get complicated to maintain so you have to have a good reason to do it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.