Raw PHP makes it far too easy to just throw something together and have it work, for today at least. Be sure to use a framework that encourages better behaviour. Markup and code should never be in the same file — user interface should be kept far, far away from application logic.
I recently returned to web development after a hiatus of a few years and I have been loving Perl Dancer, which is inspired by Ruby Sinatra. http://perldancer.org/
It's to the point where I can work on application logic and web behaviours in the same sandbox, and check in one or the other very easily, because the two parts of the system don't overlap in any files. A very good sign when I'm not even asking much of the source code management system!