Jump to content

joewilson

New Members
  • Posts

    2
  • Joined

  • Last visited

joewilson's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $query is where the array for the data is. It holds all the items which I am then showing in tables as Title / thumb / excerpt. I am not using Ajax or javascript. Its pure Php. Data that I am talking about can be from 10s to 100s of items in array. So how do we go about : That said, how much data are we talking about? If you're really using multiple pages (that is, a new page load for each page), wouldn't it be preferable to have your data resource only return enough data to create one page, and then get the data for the next page on the next page load? Any help is much appreciated.
  2. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.