A question about laying out a page with php and html Hi, I would like to be able to have the ability to lay out my php pages in anyway I like, but with just one page. I have a selection of articles in my MySQL database, and I have a php page called articles.php. Now, each article is placed on the same page, but which one depends on what the id is, e.g. aritlces.php?id=3 would bring in the article that is in row 3, and place it in the page in the layout that I've made on the html page.
I would like to know if it is possible to take this way of working, and write the code in such a way that, depending on the amount of text or size of picture, or whatever, it will lay it out differently each time, but still on aritlces.php.
This would be very helpful if I can do this, as it won't limit me to having the same layout for each article, but the layout will be different if there are two pictures, more words, a bigger/smaller picture etc. And is it possible to alter the table also using the php, basically so I can keep one page, but have each article layed out differently.
Any help would be great, thanks. |