$SizeLimit) { json_die('failure'); } include(SERVER_ROOT . '/classes/text.class.php'); $Text = new TEXT(true); global $DB; $DB->query(" SELECT ID, Title, Body, Time FROM news ORDER BY Time DESC LIMIT " . $Offset . "," . $Count); $News = $DB->to_array(false, MYSQLI_NUM, false); $NewsResponse = array(); foreach ($News as $NewsItem) { list($NewsID, $Title, $Body, $NewsTime) = $NewsItem; array_push( $NewsResponse, array( $NewsID, $Text->full_format($Title), time_diff($NewsTime), $Text->full_format($Body) ) ); } json_die('success', json_encode($NewsResponse));