AdRock Posted September 5, 2006 Share Posted September 5, 2006 Here is some code that displays the links in my pagaination but i would like them centeredIs there an easy way to do this?[code]if($prev_page >= 1) { echo("<b><<</b> <a href=/poem/$prev_page><b>Prev.</b></a>"); } //Display middle pages: **EDIT LINK PATH** for($a = 1; $a <= $total_pages; $a++) { if($a == $page) { echo("<b> $a</b> | "); //no link } else { echo("<a href=/poem/$a> $a </a> | "); } } //next page: **EDIT THIS LINK PATH** $next_page = $page + 1; if($next_page <= $total_pages) { echo("<a href=/poem/$next_page><b>Next</b></a> >>"); } [/code] Link to comment https://forums.phpfreaks.com/topic/19807-how-to-center-pagination-links-on-middle-of-page-resolved/ Share on other sites More sharing options...
roopurt18 Posted September 5, 2006 Share Posted September 5, 2006 [code]echo '<div style="text-align: center;">' . implode(', ', $Paginations) . '</div>';[/code] Link to comment https://forums.phpfreaks.com/topic/19807-how-to-center-pagination-links-on-middle-of-page-resolved/#findComment-86645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.