Forum Moderators: coopster
$max_results = 10;$from = (($page * $max_results) - $max_results);
$to = $from + $max_results;
echo $from;
echo $to;
if ( $handle = opendir("news/") )
{
while ( ( $file = readdir( $handle ) )!== false )
{
if ( $file!= "." && $file!= ".." )
{
$news_array[] = $file;
}
}
closedir( $handle );
}
array_multisort( $news_array, SORT_NUMERIC, SORT_DESC );
$news_total = ( count($news_array ) );
array_slice($news_array, 10, 20); <------ Need Help Here
$num_news = ( count( $news_array ) );
foreach ( $news_array as $val )
{
output hereeee
}
Other unrelated stuff here(such as the actual page numbers output)