Jump to content


Photo

Pagnition with ...?


  • Please log in to reply
6 replies to this topic

#1 extrovertive

extrovertive
  • Members
  • PipPipPip
  • Advanced Member
  • 235 posts

Posted 13 October 2006 - 06:50 AM

I have a pagintion page of 15+ total...now I dont to want display all the page numbers.

I want something like:

Pages: 1 2 3 4 5 ... 12 13 14 15

How would I do this in a for loop?


#2 php_coder_dvo

php_coder_dvo
  • Members
  • PipPip
  • Member
  • 18 posts
  • LocationPhilippines

Posted 13 October 2006 - 07:15 AM

for($i = 1; $i<=5; $i++){

 //do something here;

}

then create an algorithm that will compute of the 1 to 5 view is page 1, 6 to 10 is page 2 and so forth..

#3 extrovertive

extrovertive
  • Members
  • PipPipPip
  • Advanced Member
  • 235 posts

Posted 13 October 2006 - 07:33 AM

A better example?

#4 mjlogan

mjlogan
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 13 October 2006 - 08:38 AM

http://www.phpfreaks...orials/73/0.php

http://www.phpfreaks...orials/43/0.php

#5 extrovertive

extrovertive
  • Members
  • PipPipPip
  • Advanced Member
  • 235 posts

Posted 13 October 2006 - 10:11 PM

I already know pagination, just the 1 2 3 4...10 11 12

Like if I were to click 4, then it would turn to
3 4 5 6 ...10 11 12

something like that.

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 14 October 2006 - 04:04 AM

use -1 ok.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#7 irkevin

irkevin
  • Members
  • PipPipPip
  • Advanced Member
  • 293 posts
  • LocationMauritius

Posted 18 August 2007 - 05:53 AM

use - 1?? but where? i've been reading the entire forum for this solution, bit no one gave an exact explanation :S
I don't regret learning php

If you're an anime geek like me: Mu-anime




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users