function fanye()
{
if ($total <= $num)
{
$list[‘curTotal‘] = $total;
}
else
{
$offsetA = $start;
$offsetB = $offsetA + $num - 1;
$i = 0;
foreach ($list[‘list‘] as $key => $value)
{
if ($i < $offsetA || $i > $offsetB)
{
unset($list[‘list‘][$key]);
}
$i++;
}
$list[‘curTotal‘] = count($list[‘list‘]);
}
}
时间: 2024-11-07 22:53:37