AlexGomez Posted June 27, 2008 Share Posted June 27, 2008 Hi all, As anyone done any work with pagination where the input data is an XML document? Basically I have a PHP page that reads in an XML document. I would like to break up it up so that it only displays 25 results per page. The code snippet below shows what I've done so far. Unfortunately, nothing is being printed out. Any help would be greatly appreciated. Cheers Alex //load XML from URL $xml = simplexml_load_file("https://pod.ncl.ac.uk/rampart/live/getgroups.php?user=$user"); foreach ($xml->xpath("//ns:displayName") as $id) { for($x=($currentpage*25);$x<(($currentpage*25)+25);$x++) { print_r($id($x)); } } Link to comment https://forums.phpfreaks.com/topic/112178-xml-pagination-with-php/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.