Слагане на резултатите в div

FirstBlood

Registered
Трябва ми на този код
Код:
openside("Последно в форумитe");
$host="localhost";
$user="root";
$pass="livermore";
$db="system_db";
$table_topics="ipb_topics";
$table_forums="ipb_forums";
$table_category="ipb_categories";
$laforums="10";
$link=mysql_connect($host, $user, $pass);
$db=mysql_select_db($db);
$query="select * from $table_topics order by start_date desc limit 0,$laforums";
$result=mysql_query($query, $link);
while ($row=mysql_fetch_array($result)) {
$query1="select * from $table_forums where id='$row[forum_id]'";
$result1=mysql_query($query1, $link);
$row1=mysql_fetch_array($result1);
$forum_name=$row1[name];
$category_id=$row1[category];
$cat=$row2[name];
if ( $row[posts]==0 ){
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a><br>";
}
else {
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a> ($row[posts])<br>";
}

} 
closeside();
да показва
Код:
if ( $row[posts]==0 ){
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a><br>";
}
else {
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a> ($row[posts])<br>";
}
в div class="asd" .
Как ще стане ?

Мерси ;)
 
openside("Последно в форумитe");
$host="localhost";
$user="root";
$pass="livermore";
$db="system_db";
$table_topics="ipb_topics";
$table_forums="ipb_forums";
$table_category="ipb_categories";
$laforums="10";
$link=mysql_connect($host, $user, $pass);
$db=mysql_select_db($db);
$query="select * from $table_topics order by start_date desc limit 0,$laforums";
$result=mysql_query($query, $link);
echo "<div class='asd'>";
while ($row=mysql_fetch_array($result)) {
$query1="select * from $table_forums where id='$row[forum_id]'";
$result1=mysql_query($query1, $link);
$row1=mysql_fetch_array($result1);
$forum_name=$row1[name];
$category_id=$row1[category];
$cat=$row2[name];
if ( $row[posts]==0 ){
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a><br>";
}
else {
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a> ($row[posts])<br>";
}

}
echo "</div>";
closeside();
 
jooorooo каза:
openside("Последно в форумитe");
$host="localhost";
$user="root";
$pass="livermore";
$db="system_db";
$table_topics="ipb_topics";
$table_forums="ipb_forums";
$table_category="ipb_categories";
$laforums="10";
$link=mysql_connect($host, $user, $pass);
$db=mysql_select_db($db);
$query="select * from $table_topics order by start_date desc limit 0,$laforums";
$result=mysql_query($query, $link);
echo "<div class='asd'>";
while ($row=mysql_fetch_array($result)) {
$query1="select * from $table_forums where id='$row[forum_id]'";
$result1=mysql_query($query1, $link);
$row1=mysql_fetch_array($result1);
$forum_name=$row1[name];
$category_id=$row1[category];
$cat=$row2[name];
if ( $row[posts]==0 ){
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a><br>";
}
else {
echo "<a href='forum/index.php?showtopic=$row[0]'>$cat $row[title]</a> ($row[posts])<br>";
}

}
echo "</div>";
closeside();
Просто ще кажа +1 :D
 

Back
Горе