This is a must read: Six deadly PHP sins. Its a perfect summary of practices to avoid if you want your code to be maintainable and usable to someone 2 weeks from now. It's also nice to be able to say that we avoid all of those practices in our code for SyntaxCMS. It maybe over-engineered in some parts, uses eval's in a few spots (though I tried to remove those but couldn't), and it does use Smarty for just one thing, but it does seperate logic from presentation pretty well, abstract out working with the database, and functions are organized rationally into classes.
Sandy points out that the article needs spell checking but other than that you should set aside 3 minutes to read it.