Displaying a paginated list of forum topics using PHP PDO
This code is safe from the SQL injection standpoint but it is likely prone to XSS because of the untreated output, and also to possibly leak the sensitive information due to the error message unconditionally spat out. 

Regarding other improvements I would suggest a more robust connection code and to avoid bindParam calls thanks to disabled emulation mode. 

The rewritten code would be 

include 'pdo.php';
$num_rows = $conn-&gt;query('SELECT COUNT(*) FROM a_topics')-&gt;fetchColumn(); 
$pages = new Paginator($num_rows,25,array(25,50,100,250,'All'));
$stmt = $conn-&gt;prepare('SELECT a_topics.pid, a_topics.title, a_topics.forum_id, b_forums.id, b_forums.name 
    FROM a_topics INNER JOIN b_forums ON a_topics.forum_id = b_forums.id
    ORDER BY a_topics.pid DESC LIMIT :start,:end');
$stmt-&gt;execute(['start' =&gt; $pages-&gt;limit_start, 'end' =&gt; $pages-&gt;limit_end]);
$result = $stmt-&gt;fetchAll();

echo $pages-&gt;display_jump_menu().$pages-&gt;display_items_per_page();
echo $pages-&gt;display_pages();
foreach($result as $row) {
    echo htmlspecialchars($row[0]),
         " - ", 
         htmlspecialchars($row[1]),
         " - ", 
         htmlspecialchars($row[2])";
}