hello , i want to display array values in separate groups previous next link
like
khalid
amjad
ayub
<<prev next>>
if the array contain 10 element it shud work 3 times, i have done with next button like this , but unable to do the same with previous button
here is the code
<?
$tmpArr = array("Ayub","Khalid","Mangesh","Amjad","Tejas","Priti","Shalaka","Vikas","Saanjh","Sachin","Prakash","Bhavin","Sunil","Test","Test1","test12");
$count = count($tmpArr);
if(!isset($next))
$next = 5;
else
$next = $val+5;
if(!isset($val))
$val = 0;
else
$val = $val;
for ($i=$val; $i<$next; $i++)
{
print $tmpArr[$i]."<br>";
}//end of the for loop
if($next<$count)
print "<br><a href='".$SELF."?val={$i}&next={$next}'>Next >>></a>";
// print "<br><br><a href='".$SELF."?val={$i}&prev={$prev}'><<< Previous</a>";
//if($Previuos>$cnt)
// print "<br><a href='".$_SELF."?val={$i}&next={$next}'> Previos >>></a>";
?>
help will be appreciated..