Gave me an error:
Unclosed '{' on line 36
EDIT:
I see why, code you said to replace had more than you did:
$topics = $request->fetch_all();
$request->free_result();
}
return $topics;
Means, if I'm not mistaken, I need to do this:
// Now we fill the above array, maintaining the index order.
while (($row = $request->fetch_assoc()))
{
$topics[$row['id_topic']] = $row;
}
$request->free_result();
}
return $topics;
And, Great Success!