I remember working with OSCommerce years ago and it was a very poorly-written open source project then. Every PHP file would start with the <HTML>
tag and all the HTML markup and stuff and this made it very hard to maintain the project. There was so much redundant HTML markup inextricably tied up with the PHP code.
It's been my experience that it's a good idea to keep your HTML markup and PHP code as separate as reasonably possible. There will probably always be some intermingling -- like you need to output a value from php as a variable in your HTML or quite frequently you need to loop through an array of PHP values, outputting a repeated HTML pattern for each element. If you're smart, you will avoid redundant code. Software projects are a lot easier to update, maintain, and patch when you reduce code redundancy. Like, ideally, you might have one header and one footer file for your entire site.
The Model-View-Controller programming pattern aspires to this separate of markup and server logic. It's kind of a messy and abstract idea, and in practice it's never perfect, but it does encourage practices that make your code tidier and easier to maintain.
Consider adopting a framework like CodeIgniter or Laravel. These don't offer a lot of user-facing functionality straight out of the gate, but they are popular and help streamline a lot of the operations common to most PHP projects.
If your clients have simple site requirements and you want to install something quickly for them, you might get away with WordPress or Drupal or Joomla or something. In my experience, clients get excited when you set these up for them, but they quickly become a handicap when the client starts asking for customized features or starts complaining about the features they have built in.