public function return_forums_list() { if (isset($_GET['from'])) { $from = $_GET['from']; } else { $from = 0; } $forum = new forums(); $res = $forum->select_all($from); echo json_encode($res); return; }