<?php

$limit = @$_REQUEST['limit'] ? @$_REQUEST['limit'] : 10;
$offset = @$_REQUEST['limit'] ? @$_REQUEST['offset'] : 0;

$tags = mysql_select('tags', "TRUE ORDER BY `count` DESC LIMIT $limit OFFSET $offset");

$tagsData = include('tagsData.php');

return json_encode($tagsData);

?>