jaymc Posted June 25, 2009 Share Posted June 25, 2009 How do you guys build a html page which is generated dynamically through php/mysql with pagination etc.. * I have seen people use html class to deal with fully populating the page * Someone else used arrays e.g $html['head'] .= "<script type=text/javascript></script>"; then just echo each of the array elements out What way do you use and what way is the 'correct' in terms of todays standards I have been playing around with doing it via html class but also like the idea of doing it using arrays to store key parts that make up the end result of the page Any basic examples would be nice too Quote Link to comment Share on other sites More sharing options...
WolfRage Posted June 25, 2009 Share Posted June 25, 2009 I perfer to use a class for many reasons. One I can have defined variables with in the class to include pre-built arrays. But the major advantage is that it can be completely self building with a single call. It is easy to modify and to build in customization possibilities. It can be expanded upon using inheritance. Quote Link to comment Share on other sites More sharing options...
jaymc Posted June 25, 2009 Author Share Posted June 25, 2009 THanks for input anyone else like to share with the class hehe Quote Link to comment Share on other sites More sharing options...
phant0m Posted June 25, 2009 Share Posted June 25, 2009 I tend to use the output buffer quite a lot in combination with my template system. In my "index"-templates I just have some variables like one in the header, one in the body, one for the title etc And the entire Template System is OOP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.