This is exactly one of the most important reasons I chose for CMS Made Simple.
I don't know what you mean with "dynamic sites" but it is very easy to integrate php into your site. Just put your code in a "User Defined Tag" (UDT) and put it with a smarty tag in your content.
http://wiki.cmsmadesimple.org/index.php ... fined_Tags
Also you can do a lot with Smarty itself, you don't always need php to do what you want. Smarty has a lot of similarities with php, so it's very easy to learn when you already know php. Maybe nice to know that you can use all php-functions as a so called modifier.
http://www.smarty.net/docsv2/en/
php/database driven sites
Re: php/database driven sites
To really tell if it's for you try the demo, is a link up top under downloads...