David, I'm afraid that what you ask can't be learnt in a post or two. It is a whole subject in itself and it could fill a few books. Your question is too wide to cover it here so I will suggest ... what Ultimate suggested... do a search and you'll find thousands of threads about it, each one of them from a different point of view.
Having said, I will add that it doesn't matter which programming language you use, what's important is the code output you will create in the end.
In order to know what kind of HTML you need to create to have a SEO friendly website, I would suggest that you read the tips and tricks posted in the stickies and important threads of the SEO forum, and that you learn (if you don't already know) your HTML well. After that, you can use PHP or anything to create that good and SEO friendly HTML.