📜  php 分页省略号 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:41.935000             🧑  作者: Mango

代码示例1
$count = 7; // number to show
// start at half threshold down from the current location.
$number = $current - round($count/2); 
if( $number > 1 ) echo '...';
else $ // increase to have number start at 1.
for( $number; $number < $number + $count; $number++)
{
    // your for loop as normal
}
if( $number < $total ) echo '...';