It won't be hard to understand what your CMS is doing if you learn about that side of things, I'm sure. and then you aren't reinventing the wheel. These systems basically put your content into a database and pull it out again, just as you would do if you were building this from scratch.
SitePoint does have a nice book on how to do this yourself (PHP Novice to Ninja) but I'd still recommend a CMS. There are lots of equally good ones out there. The one I'm familiar with is ExpressionEngine, but is has a price tag. A similar free one is MODx. Another good one is Silverstripe, and you kind of need to understand its basic unlerlying functionality to make a site with it anyway.
There are also some great little CMSes like Perch and Pulse.
Other bigger ones worth a look include Drupal, CMSMadeSimple, Concrete5 and Textpattern.