Hi-yah:
The comments so far are vital to learning good code practices, here are some useful resource suggestions:
The online PHP reference manual - specifically the function reference - is located
here. This is a great resource, both while you're learning and once you've had some experience writing code.
Also, another good way to learn is by looking at other programmer's code. A fantastic resource for butt-loads of scripts covering many different applications is
www.hotscripts.com. Don't just copy their code,
understand what the code is doing and why.
Of course, these forums and many other PHP programmer specific forums all over the 'net are a valuable tool once you hit a rough spot. Don't be afraid to speak up. Well, good luck to you and good programming...