I'm running this code, not sure if it's a version error or just bad coding
<?php
require_once "query.php";
$page = isset($_GET['page']) ? (int)$_GET['page'] : 1;
$perPage = isset($_GET['per-page']) && $_GET['per-page'] <= 50 ? (int)$_GET['per-page'] : 3;
$start = ($page > 1) ? ($page * $perPage) - $perPage : 0;
$minutes = $db->prepare("
SELECT SQL_CALC_FOUND_ROWS id, title, minutes, date
from minutes
ORDER BY id DESC
LIMIT {$start}, {$perPage}
");
$minutes->execute();
$minutes = $minutes->fetchAll(PDO::FETCH_ASSOC);
$total = $db->query("SELECT FOUND_ROWS() as total")->fetch()['total'];
$pages = ceil($total / $perPage);
?>
Parse error: syntax error, unexpected '['