php - pagination of multi dimensional array -


a sample result api formatted follows. "limit" can set 500. i've tried various pagination classes parse results unsuccessful in attempts. provide option ["page"] => int(x) makes easy paginate. easy code gods maybe, not me. appreciated.

$var = array(7) {        ["errors"]=> array(0) { }        ["warnings"]=> array(1) {          [0]=> array(2) {            ["code"]=> string(26) "api_class_update_available"            ["msg"]=> string(58) "the api class available in version 1.6"          }        }        ["data"]=> array(4) {          [0]=> array(3) {            ["url"]=> string(7) "http://"            ["keyword"]=> string(7) "keyword1"             ["price"]=> string(5) "23.99"          }          [1]=> array(3) {            ["url"]=> string(7) "http://"            ["keyword"]=> string(7) "keyword2"             ["price"]=> string(5) "19.99"          }           [2]=> array(3) {            ["url"]=> string(7) "http://"            ["keyword"]=> string(7) "keyword3"             ["price"]=> string(5) "29.99"          }          [3]=> array(3) {            ["url"]=> string(7) "http://"           ["keyword"]=> string(7) "keyword4"             ["price"]=> string(5) "9.99"          }        }       ["countrycode"] => string(2) "us"        ["page"] => int(1)        ["limit"]=> int(4)      }  

your question bit incoherent, i'll attempt answer it. sounds need implement basic pagination. here's few links.

http://google.com/search?q=php+pagination

http://forums.devnetwork.net/viewtopic.php?f=1&t=99545&p=537019#p537019

instead of database queries, you'll using array_slice(). same concept though.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -