Looks to me like your code has a major drawback. You don't need to run so many queries. Try one or two queries and loop through the
result set(s) (you're only extracting one of the tuples from each query) instead of running multiple queries. Hope this helps.
Example:
PHP Code:
$result = mysql_query($query, $dblink);
while($row = mysql_fetch_array($result))
{
$populars[$row['id']]['subject'] = $row['subject'];
$populars[$row['id']]['subject_2'] = $row['subject_2'];
....
}