Como eu faco para depois que ele terminar o codigo ele voltar para o comeco do codigo denovo??
Tipow
veja se vc's entendem:
<?
echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">');
echo('<tr>');
echo('<td>Menu Principal</td>');
echo('</tr>');
echo('</table>');
mysql_connect('localhost','root','');
mysql_select_db('rpgzone');
$sql = "SELECT * FROM menu2";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
$sql2 = "SELECT * FROM menu2 ORDER BY n DESC";
$sql3 = "SELECT * FROM categorias ORDER BY n DESC";
$result = mysql_query($sql3);
while($myrow = mysql_fetch_array($result)) {
$ncat = $myrow["n"];
$sql4 = "SELECT * FROM categorias WHERE n=$ncat";
$result = mysql_query($sql3);
while($myrow2 = mysql_fetch_array($result)) {
$nome = $myrow2["nome"];
echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">');
echo('<tr>');
echo('<td>'.$nome.'</td>');
echo('</tr>');
$result = mysql_query($sql2);
while($myrow3 = mysql_fetch_array($result)) {
$titulo = $myrow3["titulo"];
$hot = $myrow3["hot"];
$link = $myrow3["link"];
$catid = $myrow3 ["categoria"];
if($ncat == $catid) {
if(empty($texto)) {
echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">');
echo('<tr>');
echo('<td><a href="'.$link.'">'.$titulo.'</td>');
echo('</tr>');
$id[1] = '0';
}else{
echo('<table width="75%" border="1" cellspacing="0" cellpadding="0">');
echo('<tr>');
echo('<td>'.$titulo.'</td>');
echo('</tr>');
echo('<tr>');
echo('<td>'.$texto.'</td>');
echo('</tr>');
echo('</table>');
}
}
}
}
}
if($id[1] == '0') {
echo('</table>');
}
?>










