Hi I am writing this code for a wordpress plugin that gets content from a json file and then decodes them
<table border="1">
<tr>
<th>Thumbnail</th>
<th>Title</th>
<th>Excerpt</th>
</tr>
<?php
$url = http://localhost/wordpress/json;
$json = file_get_contents($url);
$safe_json = str_replace("\n", "\\n", $json);
$query = json_decode($json, true);
foreach ( $query as $item )
{
echo '<tr>';
echo '<td>' . $item['image'] .'</td>';
echo '<td>' . $item['title'] .'</td>';
echo '<td>' . $item['excerpt'] .'</td>';
echo '</tr>';
}
?>
Now I need help in paginating the data. Any help will be appreciated.