|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Displaying Page # in a Table
Hi. I have created a script that echo's database content in to a table. Now, what I want to do is have it display an increasing page # for each 5 rows. Ex:
P# | ID# 1 | 1 1 | 2 1 | 3 1 | 4 1 | 5 ------ 2 | 6 2 | 7 2 | 8 2 | 9 2 |10 ------ 3 |11 3 |12 3 |14 etc.. I hope you get the idea. If this is easy to do im gonna be mad . I've been messing around all day trying to figure this out and have finally done what I hate doing, get help.Current code: PHP Code:
Last edited by mg03 : July 10th, 2003 at 02:05 AM. |
|
#2
|
|||
|
|||
|
Hey hey,
Is this related to the other "group by 5" problem that I solved? ![]() Yes, it should be simple enough to do. Put this in the beginning of your loop, before outputting the row. PHP Code:
|
|
#3
|
|||
|
|||
|
Thanks again. Works. I need to read up on the rounding functions.
Just when I thought I was getting good at PHP. |
|
#4
|
||||
|
||||
|
Quote:
Quote:
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#5
|
|||
|
|||
|
Maybe so, but I have a hard time understanding how the code operates when someone just gives it to me. Its hard for me to figure out how it does what it does.
|
|
#6
|
|||
|
|||
|
PHP has many formats of it's manual available for download.
HTML, PDF, PalmPilot, and HTML Help file. You can get them from here: http://www.php.net/download-docs.php This should help you out if you need to quickly reference the manual to find out if a particular function is available. Most of the time, if you can figure out a way to solve a problem, there is a function available that can help you solve it. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Displaying Page # in a Table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|