Small Modification In Php

I have a function in PHP which lists the pages in a category, all I want is for list to be divided: each 30 on one line.
The Function is:

function category_pages_list_numbers($this_url,$total,$page) {
global $s,$m;
$pages = ceil($total/$s[per_page]);
if ($pages==1) $pages_list = ”;
else
{ for ($x=1;$x<=$pages;$x++)
{ if ($x==$page) $y .= ” <b>$x</b> “;
elseif ((!$s[pages_max_ads]) OR (($x>=($page-$s[pages_max_ads])) AND ($x<=($page+$s[pages_max_ads])))) $y .= ‘ <a href=”‘.$this_url.’/page-‘.$x.'”>’.$x.'</a> ‘;
if ($s[pages_max_ads])
{ if ($page>1) $link_first = ‘ <a href=”‘.”$this_url/page-1″.'”><<</a> ‘;
if ($page<$pages) $link_last = ‘ <a href=”‘.”$this_url/page-$x”.'”>>></a> ‘;
}
if ($x==($page-1)) $link_down = ‘ <a href=”‘.$this_url.’/page-‘.($page-1).'”><</a> ‘;
elseif ($x==($page+1)) $link_up = ‘ <a href=”‘.$this_url.’/page-‘.($page+1).'”>></a> ‘;
}
$pages_list = ” $link_first$link_down$y$link_up$link_last”;
}
return $pages_list;
}

Leave a Reply

Your email address will not be published. Required fields are marked *