 <p>I would write all your business logic as classes with those arrays in a <strong>MODEL</strong> file, access those classes from the <strong>CONTROLLER</strong> file. And then once you have all your data, access from the <strong>CONTROLLER</strong> the <strong>VIEW</strong> file to output. Inside the <strong>MODEL</strong> write functions for those arrays so that you can reuse them, if they vary they may need own functions. This is a helpful link: <a href="http://php-html.net/tutorials/model-view-controller-in-php/" rel="nofollow">http://php-html.net/tutorials/model-view-controller-in-php/</a> and those videos give you a taste of the logic behind MVC: <a href="http://www.youtube.com/watch?v=HFQk8WGK1-Q&amp;feature=bf_prev&amp;list=UU9-GXsmQQ-N4h8ZsKI8CSkw" rel="nofollow">http://www.youtube.com/watch?v=HFQk8WGK1-Q&amp;feature=bf_prev&amp;list=UU9-GXsmQQ-N4h8ZsKI8CSkw</a></p>