PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am trying to get this php script to go to my database gather all the data from my news table and display it in a table, however it only displays the most recent record and I cannot figure out why, I might be making a stupid mistake but cannot see anything wrong with it, any suggestions would be appreciated. Cheers.
Your html display is outside the "while" loop, so it is executed only after the loop has completed. That's why only the most recent item is displayed. It needs to be within the loop so that each item is displayed before the next item is extracted from the result set.