Need php pagination no database with a href and ul

Hello.

I am a newbie on php coding and I need your help.
Now the codes in HTML and CSS which wants to be stylish with pagination numbers as shown in pagination using my code.

How do I do this I need the code can not find anywhere how to do pagination in my code like this I would.

1,2,3,4,5,6,7,8,9,10 Next

Here’s the code and the example:

<style>

body{
background: #383838;
}

.pages{
margin: 0 auto;
padding: 0;
display: block;
font-weight: bold;
font-size: 10pt;
}

ul{
list-style-type: none;

}

.pages li{
float: left;
padding: 1px;

}

.pages li a{
color: #ffffff;
background: #383838;
border: 1px solid #000000;
padding: 5px 5px;
line-height: 1em;
text-decoration: none;
background: transparent url(pages.gif) repeat-x 0 0;
width: 11px;
height: 27px;
}


.pages li a:hover{
color: #000000;
background: transparent url(pageshov.gif) repeat-x 0 0;
width: 11px;
height: 27px;
}
</style>

<div class="pagination">
<ul class="pages">
<li><a href="">1</a></li>
<li><a href="">2</a></li>
<li><a href="">3</a></li>
<li><a href="">4</a></li>
<li><a href="">5</a></li>
<li><a href="">6</a></li>
<li><a href="">7</a></li>
<li><a href="">8</a></li>
<li><a href="">9</a></li>
<li><a href="">10</a></li>
<li><a href="">11</a></li>
<li><a href="">next</a></li>
</ul>
</div>

PHP Paginator

This is very easy pluginable in any code and which works very independently. There is paginator.css, just you can add your own style to design it based on your requirement.

Might be useful for you.

hmm, I don’t really understand what you want. Do you need to translate the code to php? If no database is used you’d probably get away with just using javascript (depending on how the content is generated)

I need a simple php script to work with CSS code mine.
Pagination such as Google.

How does it works i do not understand.
Because there is no explanation how to use it.

It does not work or i do not know how to fix it it can’t highlight page 2 or even show the number as index.php ,index2.php

Here is the code i can’t understand.
I’m new for this.

What does it mean this offset
http://localhost/dizainas2/index2.php?bar=2&baz=3&offset=11
http://localhost/dizainas2/index.php?bar=2&baz=3&offset=11

I tried to change offset like this

http://localhost/dizainas2/index.php?bar=2&baz=3&offset=1
http://localhost/dizainas2/index2.php?bar=2&baz=3&offset=2

Nothing happens :frowning:

If i add all this code to page i get a lof of paginations

like this but just a lot of times repeating 1,2,3,4,5,6,7,8,9,10 next

1,2,3,4,5,6,7,8,9,10 next
1,2,3,4,5,6,7,8,9,10 next
1,2,3,4,5,6,7,8,9,10 next
1,2,3,4,5,6,7,8,9,10 next

Then i add only one like this but still does not works.


<?php
include("Paginator.php");
Paginator::paginate(0,100,10,"index.php?bar=2&baz=3&offset=");
?>

Welcome to SitePoint!

We can’t visit your linked pages as they are hosted on your local server and not available to the web.

Can you post your code here? Or better yet, do you have a website you can upload your pages to?

I’m new for php so i need only simple php script with hyperlinks like
the css code just to style my pagination cobining with php code.
I do not to translate it i just need simple php script like so below to make it work
<a href=“index.php” target=“_blank” alt=“bla”>1</a>
<a href=“page1” target=“_blank” alt=“bla”>2</a>
<a href=“page2” target=“_blank” alt=“bla”>3</a>

1,2,3,4,5,6,7,8,9,10 next

Cause i do not know php coding very well.
That’s why i’m asking you to help.

This is what i have only

example:

<div class="pagination">
<ul class="pages">
<li><a href="page1">1</a></li>
<li><a href="page2">2</a></li>
<li><a href="page3">3</a></li>
<li><a href="page4">4</a></li>
<li><a href="page5">5</a></li>
<li><a href="page6">6</a></li>
<li><a href="page7">7</a></li>
<li><a href="page8">8</a></li>
<li><a href="page9">9</a></li>
<li><a href="page10">10</a></li>
<li><a href="">next</a></li>
</ul>
</div>

I found an example how it looks like.

Look at here

But i do not understand and the code how to use it.
and of cource i need without database only simple script and how to put it into html pages with php explain how it works.
Thanks for you all

how it works in pages? tamilsuresh this paginator.
Do I need to enter the full address of the site work?
because of the html I know how it links to other sites but not php.
I am a newbie and so I applied to help me to learn how it works and as a representative of the PHP pages to another pages with no databases.

How does it works i do not understand.
Because there is no explanation how to use i