我希望在5到5之后隐藏一些页码,但这是我的代码
<?php
$total_no_of_pages=ceil($total_no_of_records/$records_per_page);
$current_page=1;
if(isset($_GET["page_no"]))
{
$current_page=$_GET["page_no"];
}
if($current_page!=1)
{
$previous =$current_page-1;
echo "<a href='".$self."?page_no=1'>First</a> ";
echo "<a href='".$self."?page_no=".$previous."'>Previous</a> ";
}
for($i=1;$i<=$total_no_of_pages;$i++)
{
if($i==$current_page)
{
echo "<strong><a href='".$self."?page_no=".$i."' style='color:red;text-decoration:none'>".$i."</a></strong> ";
}
else
{
echo "<a href='".$self."?page_no=".$i."'>".$i."</a> ";
}
}
if($current_page!=$total_no_of_pages)
{
$next=$current_page+1;
echo "<a href='".$self."?page_no=".$next."'>Next</a> ";
echo "<a href='".$self."?page_no=".$total_no_of_pages."'>Last</a> ";
}
?>
我知道我需要编辑代码的插件,如
for($i=1;$i<=$total_no_of_pages;$i++)
{
if($i==$current_page)
{
echo "<strong><a href='".$self."?page_no=".$i."' style='color:red;text-decoration:none'>".$i."</a></strong> ";
}
else
{
echo "<a href='".$self."?page_no=".$i."'>".$i."</a> ";
}
}
是否可以通过较小的修正进行修改,请不要重复,因为我没有得到所需的答案
提前致谢
答案 0 :(得分:0)
怎么样?
let startVC: UIViewController = viewControllerAtIndex(indexImage)
let viewControllers: [UIViewController] =
Array<UIViewController>(arrayLiteral: startVC)
pageViewController.setViewControllers(viewControllers,
direction: UIPageViewControllerNavigationDirection.Forward,
animated: true, completion: nil)