The basic principal is this:
We've all pretty much learned as we went...
One thing you can do for yourself is to go to Hotscripts.com, figure out what you want to do, find a free script there, and disect it (with your manual to see how things work the way they do). Start with a simple counter script, or something like that, and work your way up.
If you have troubles with code, come ask, and we can help...
There are so many "basic" principles, that we could spend all day trying to show you... The PHP manual is great, because not only does it explain the code, but there are tons of real world examples of how to implement things as well.