I want to make a pagination like div. Right now div is populated with xml, which displays 6 results. I want on a click of a button to display next/previous 6 results. I have no idea how to force xml return results like from matches[0] to matches[5] and on next click matches[6] to matches[11].
XML in widget.php:
foreach ($xml->team->last_matches->match as $match) {
//some php and html stuff
}
if javascript variable that I pass to file widget.php is limit
, want something like:
for ($x = 0; $x < $_GET['limit']; x++)
foreach ($xml->team->last_matches->match[x] as $match) {
//some php and html stuff
}
}
Not sure where to specify to display last six entries up to limit
. Thanks in advance.