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!
This is part to a dynamic page I made. It retrieves information from a database and then displays it. It retrieves communitys and then it retrieves the listings and puts each listing it pulls with the community it belongs to. The way it should display in a simplified format is below :
is inside of the while(); loop. But I can't figure out how to make it put the </table> after it is done echoing all the listings for a community. Any help? I hope I have been specific enough. Thanks!
Hm, I am not really following how that controls when </table> will be put in. Could you explain how it is working? I am still somewhat new to PHP so it takes me a bit more to catch on sometimes.
Which lines of my example code are you giving you trouble? It's pretty barebones so step through it in your head a few times while writing down the output and it should become clear. If not, let me know which part needs explaining.
I know why that code isn't working...I think anyways. When it runs through the code that is outputting the listings it is checking that section of code that you came up with. Then, it resets the variable to false and after the first listing every listing after that is having a </table> at the end. Did that make sense?