Put reusable code into separate files. Sometimes you might have a slightly modified custom version usable only on one page. When that happens I leave it in the page and if it's also got HTML in it (getting rarer) I put all functions at the bottom.
Get a variable convention going. I use all lowercase for form variables, camel cased for php variables, and functions are underscore separated.
Look at 'professional' code, too. You'll eventually look back on your old code in almost disgust because your practice has changed. I've adopted lots of the PEAR ways and if I find
for($i=0;$i<30;$i++)
// then I now have to change it to
for ($i = 0; $i < 30; $i++)
You'll soon find readability is a big key. If you look at your code in a week and think "what does that bit do?" then you know it's time to comment, rearrange or put something into a function.