"; while($row=mysql_fetch_array($query)){ $meniu .= "".$row['id'].""; $query2 = mysql_query("SELECT * FROM `meniu_sublinkuri` WHERE `pid`='".$row['id']."' ORDER BY `ord` ASC"); if(mysql_num_rows("$query2")!=0) $meniu .= ""; while($row2=mysql_fetch_array($query)){ $meniu .= ""; } if(mysql_num_rows($query)!=0) $meniu .= "
".$row2['id']."
"; $meniu .= ""; } $meniu .= ""; $main = str_replace("{meniu_dinamic}",$meniu,$main);*/ echo $main; //mysql_close(); ?>