Templates in php
One thing I've never undestood in templates it how people use them in php. For example if I create a:
- match reports page id call it reports.php
and if I created a news page i'd call it:
But I see some websites just have one template page ie: page.php an then use it to call out the section they want ie:
Then depending on what's called out the way the information is called out is changed in the way the page is laid out. An example being:
Can anyone please explain and possibly post links to any tutorials
Logic without the fatal effects.
All code snippets are licensed under WTFPL.
What I presume is that the provided website works on includes bases.
It would check value of section var provided through GET, and include corresponding "template" or php page to show.
Purpose of templating is separating php code and presentation.
I would suggest you to search this forum a little bit about it, I'm sure it was discussed many times before.