I got this error with my paging script. My editor says its on the $active line, but I can't see where it should be tbh.
unexpected T_STRING
$current_page = 1;
if(isset($_GET['pagenr']) && is_int($_GET['pagenr'] * 1))
{
$current_page = $_GET['pagenr'] * 1;
}
$query_count = "SELECT COUNT(thread_id) AS antal FROM forum_thread WHERE fk_sub_category_id = $subid ORDER BY sticky_thread DESC";
$result_count = mysqli_query($con, $query_count);
$row_count = mysqli_fetch_assoc($result_count);
$threads_in_category = $row_count['antal'];
//Ceil runder op til hele tal.
$total_pages = ceil($threads_in_category / $threads_per_page);
echo "<ul class='pagination'>";
for ($i=1; $i<=$total_pages; $i++)
{
$active = ($current_page == $i ? 'class="active"' : 'class="test"');
$href = "?page=categories&category_id=$category_id&pagenr=$i";
echo "<li $active><a href='$href'>$i</a></li>";
}
echo '</ul>';
//Paging end.