What are some ways to sort and load posts into a dynamic php template
<p>I currently have two projects I'm working on, a small flash game site to practice things and get a grasp on some concepts and a blog/game dev advertisement hybrid. My question to you guys is what would be the most efficient way to load posts so I could do things like generate pages with a specified number of entries on them and sort them based on categories I will define later. It may just be my ignorance, but storing each one in a file seems rather inefficient since there will be quite a few of them to store.
example of a basic game "post" from the small flash game site, just really a div container for it all and, and I could add something in like a tag system to sort it out later</p>

<pre><code>    &lt;div class="game"&gt;
                &lt;a href="games/game.php?game=somegame"&gt;&lt;img src="images/somegame.png"&gt;&lt;/a&gt;
                &lt;div id="content"&gt;
                    &lt;a href="games/game.php?game=somegame"&gt;&lt;header&gt;Game name&lt;/header&gt;&lt;/a&gt;
                    &lt;p&gt;
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

                    &lt;/p&gt;
                &lt;/div&gt;
            &lt;/div&gt;
</code></pre>
