That's not completely what I meant.
I want to display the number of posts in the different topics like this:
Topic number 3160 has ... posts
Topic number 3170 has ... posts
and so on...
Is there a way of getting the $topic_id into
<?php echo('Topic has '.$num_posts.' posts.'); ?>
this line of code, so I only have to run
<?php $pun_root = './forums/';
require $pun_root.'include/common.php';
$result = $db->query('SELECT num_replies+1 FROM '.$db->prefix.'topics WHERE id='.$topic_id) or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
$num_posts = intval($db->result($result, 0));?>
this code once at the top of the page and it will read the different topics?
Thanx in advance!