...

View Full Version : Paging an Array (Not From MySQL)



Immulsifier
11-22-2007, 12:19 AM
For some reason im having a mental block tonight :confused: I have an array in the following format.



$theArray = array ('key1' => 'value1', 'key2' => 'value2');


Now with MySQL you can use the LIMIT function to only select out the rows from the database which are applicable to the page you are viewing. How can I do something similar to this just using an array like the one above.

Inigoesdr
11-22-2007, 12:21 AM
array_slice() (http://php.net/array_slice)

Immulsifier
11-22-2007, 12:33 AM
Many thanks, so simple in the end :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum