So here is the error that I'm getting in my browser:
Here is my code, including line 158:
for($i = 0; $i < count($sortbyperiod); $i++) {
$queryname = "SELECT name FROM '" . $sortbyperiod[$i] . "' ORDER BY year ASC, month ASC, day ASC";
$result = $con_classdata->query($queryname);
$row = mysqli_fetch_array($result);
$names = $row['name'];
The variable $sortbyperiod[$i] is clearly a single entry. Why is it giving me an array?
EDIT: Please do not give me PDO solutions, I prefer using mysqli. EDIT 2: Text code instead of image.