$que = "select * from shop_catagory_upper order by grade desc, num desc";
$result = mysql_query($que, $conn);
$tot = mysql_num_rows($result);
$i = 1;
while($row = mysql_fetch_array($result))
{
$title_url1 = "/file/". $row["title_url1"];
$layer_opt = "";
$j=1;
for($j=1; $j <= $tot ;$j++)
{
if($j == 1)
{
if($j == $i)
{
$layer_opt = "'submenu".$j."','','show'";
} else {
$layer_opt = "'submenu".$j."','','hide'";
}
} else {
if($j == $i)
{
$layer_opt .= ",'submenu".$j."','','show'";
} else {
$layer_opt .= ",'submenu".$j."','','hide'";
}
}
}
?>
|
|
$i++;
}
?>
|