Jump to content

Building html page


jaymc

Recommended Posts

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 :)

Link to comment
Share on other sites

  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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.