getID(); $row['url'] = $link->getURL(); $row['url_safe'] = $link->getURL(HTMLSAFE); $row['title'] = $link->getTitle(); $row['title_safe'] = $link->getTitle(HTMLSAFE); $row['description'] = $link->getDescription(); $row['description_safe'] = $link->getDescription(HTMLSAFE); $data['links'][] = $row; } $data['canedit'] = $_SESSION['validated']; pushData($data); exit(); function pushData($data) { header('Content-Type: application/json'); echo json_encode($data); exit(); }