Jump to content

Pagination with multi-dimensional array...


easyedy

Recommended Posts

HI I'm trying to add a pagination class to a multidimensional array but this class gives examples only for an SQL query and I can't figure out how to make the foreach paginate.

 

Here is the code:

 

How can I make this work with an huge array?

require_once ‘paginator.class.php’;
$pages = new Paginator;
$pages->items_total = $db_count;
$pages->mid_range = 7;
$pages->paginate();
echo $pages->display_pages();

SELECT id, name, address FROM table ORDER
BY id ASC $pages->limit

What do I need to add to the foreach of the array to make it paginate?
ie: foreach($pagenate as $row)…

echo $pages->display_pages();
echo $pages->display_jump_menu();
echo $pages->display_items_per_page()

 

What do I need to add to the foreach of the array to make it paginate?

ie: foreach($pagenate as $row)…

Link to comment
https://forums.phpfreaks.com/topic/105490-pagination-with-multi-dimensional-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.