|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I currently have a page that displays the content of one of my databases. I would like to insert a <HR> after every 5 entries. How would I go about doing this? My current code:
PHP Code:
Last edited by mg03 : July 9th, 2003 at 08:34 PM. |
|
#2
|
|||
|
|||
|
PHP Code:
Last edited by avit : July 9th, 2003 at 09:10 PM. |
|
#3
|
|||
|
|||
|
Thankyou, but unfortunately it echos a <HR> after the first 2 rows for some reason. After that, it functions correctly and places them every 5 rows. Do you have a clue why?
|
|
#4
|
|||
|
|||
|
I had an off-by-one error in my original code; the $numrows - 1 wasn't necessary so change it to just $numrows (see code sample below).
However, that doesn't solve your problem. I can't really say what's wrong without seeing it in place in your code. You don't have another existing variable called $rowcount do you? Try running this stand-alone and see that it works: PHP Code:
|
|
#5
|
|||
|
|||
|
Thanks a lot avit. That fixed it! I can program for hours and always get stuck on one tiny little thing.
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Formatting MySQL Results |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|