标签:foreach count off tar value key start lis set
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‘]);
}
}
标签:foreach count off tar value key start lis set
原文地址:http://www.cnblogs.com/zixiaofeixian/p/6292687.html