$result = dbquery("SELECT * FROM phpbb_posts ORDER BY post_id DESC LIMIT 0,10"); $data = dbarray($result); $result_t = dbquery("SELECT * FROM phpbb_topics ORDER BY topic_replies DESC LIMIT 0,10"); $name = dbarray($result_t); if(dbrows($result)!=0){ echo " "; if ($date['topic_id']=$name['topic_id']{ echo $name['topic_title']; } }