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

ths news are here:

					include "db_connect.php";

					$sql_destaque = "SELECT data_destaque, descricao_destaque FROM destaques ORDER BY cod_destaque DESC LIMIT 4";

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

					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>';


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,

Edited by PF2G: n/a

5 Years
Discussion Span
Last Post by broj1

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.