My projects are designed with the following way, each database table has it's class and then each page looks like this... functions related to the database are on the top and the output on the bottom just a simple example: <?php layout('header'); $categories = category::find_all(); ?> <?php foreach($categories as $category) : ?> <?php echo $category->id; ?> <img src= '<?php echo $category->pic; ?>' /> <?php endforeach; layout('footer'); ?> PHP: Well, from what i've been reading, it's not too good combining design and php on the same page. Therefore i would like to know where can i find information about techniques of designing my projects in a better way? Do you have any tips or some information which can lead me the right way? thank you.
Yes, it's better if you split code and design You can search on the internet about MVC (Model - View - Controller). Code Igniter framework is the good example to start about that.
Ok i've been reading a little and overall it's not far from what i am doing. My current classes are actually Modules and all i have to do is to split my view pages into controllers and views... The question is, should i stick with this and improve it overtime for my own preferences or to just jump into a framework such as CodeIgniter.
It could be worth reading up on Code Igniter if you are wanting to use an MVC framework. It is one of the better known ones and have a fair few tutorials around that you can read up on. If you are looking for an alternative, try looking at CakePHP too