devofash Posted March 21, 2010 Share Posted March 21, 2010 Hi Guys, Could do with some help if possible. I've got an array of data and I need to paginate it. I'm not that good with arrays / pagination. Sorry I don't have any php code, coz I don't know where to start. The pagination doesn't have to be complex just a simple Next/Previous link will do and then i'll try to add the 1,2,3,4 pages in by myself. Any help is much appreciated. Thanks in advance. Array ( [Company] => Array ( [Employers] => Array ( [0] => Array ( [Name] => Array ( [value] => Person 1 ) [Email] => Array ( [value] => [email protected] ) ) [1] => Array ( [Name] => Array ( [value] => Person 2 ) [Email] => Array ( [value] => [email protected] ) ) [2] => Array ( [Name] => Array ( [value] => Person 3 ) [Email] => Array ( [value] => [email protected] ) ) ) ) ) Link to comment https://forums.phpfreaks.com/topic/196019-array-pagination/ Share on other sites More sharing options...
JAY6390 Posted March 21, 2010 Share Posted March 21, 2010 How are you getting the data into an array to begin with? XML, MySQL? Link to comment https://forums.phpfreaks.com/topic/196019-array-pagination/#findComment-1029620 Share on other sites More sharing options...
devofash Posted March 21, 2010 Author Share Posted March 21, 2010 via xml and converting the xml to an array using the function available here http://www.bin-co.com/php/scripts/xml2array/ Link to comment https://forums.phpfreaks.com/topic/196019-array-pagination/#findComment-1029621 Share on other sites More sharing options...
devofash Posted March 22, 2010 Author Share Posted March 22, 2010 could really do with some help guys. Link to comment https://forums.phpfreaks.com/topic/196019-array-pagination/#findComment-1030215 Share on other sites More sharing options...
JAY6390 Posted March 23, 2010 Share Posted March 23, 2010 Well you can use array_chunk() to create chunks of data for the array. Other than that I'm not really sure Link to comment https://forums.phpfreaks.com/topic/196019-array-pagination/#findComment-1030286 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.