Ok so ill tell you the truth here.. i never heard of these functions until erlier today lol
what this basically does is allow you to paginate an array.. yes paginate
here's the function list and then some examples of them
heres some usage examples
this navigation is stored like sessions so your position is always held.
heres a full example of usage
hope i brought a little more tips to the table :P
what this basically does is allow you to paginate an array.. yes paginate
here's the function list and then some examples of them
PHP:
next();
prev();
current();
reset();
end();
heres some usage examples
PHP:
$array = array('litewarez','katz','phaze','others');
//Next
echo current($array);//litewarez
echo next($array); //katz
echo end($array); //others
echo prev($array); //phaze
echo reset($array);//litewarez
next($array);
next($array);
next($array);
prev($array);
next($array);
echo current($array); // others
this navigation is stored like sessions so your position is always held.
heres a full example of usage
PHP:
$aFruit = array ('Tried' => array('Apple', 'Kiwi'),
'Not Tried' => array('Pear', 'Orange', 'Banana')
);
while($aChild = key($aFruit))
{
while($szItem = current($aFruit[$aChild]))
{
echo current($aFruit[$aChild]) . '<br />';
next($aFruit[$aChild]);
}
next($aFruit);
}
hope i brought a little more tips to the table :P