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] => person1@company.com ) ) [1] => Array ( [Name] => Array ( [value] => Person 2 ) [Email] => Array ( [value] => person2@company.com ) ) [2] => Array ( [Name] => Array ( [value] => Person 3 ) [Email] => Array ( [value] => person3@company.com ) ) ) ) ) Quote Link to comment 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? Quote Link to comment 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/ Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.