You're really in for a treat. PHP is simple but really satisfying to code, it's like putting a puzzle together and with each piece you get to fit you really start to understand the language more and more.
I'd just jump into it straight-up and maybe use w3schools.org as a source, they've got some good cheatsheets and guides.
I'm actually going to try to get some basic parts covered right in this post:
A span of PHP is really treated as a self-closing HTML tag: begins with a <?php and ends with a ?>, so a simple span of it might look like <?php print("Macs are awesome!"); ?>. The rest of a PHP document is treated like HTML; the <?php tells the server to start treating the code like PHP and ?> says "alright, treat the rest of this like unprocessed HTML."
Variables are preceded by a $ (dollar sign) and can't start with numbers. You don't need to explicitly initiate a variable; just the first time you use it, PHP knows it's a variable. To make a variable be something, use =, such as $mrmister="thebest". btw, text has to be in quotes to not be treated like a command or something else that might screw the PHP up. To test a variable without rewriting it, use == instead of a single =. Which brings me to if() statements:
An if statement is just a test of whether a condition is true. So if I've stated that $number=5 and then run the if statement
if($number==5)
print("five is an awesome number");
then "five is an awesome number" will be printed. If the statement had been if(number==4), then it wouldn't have worked. You can also include an else statement after it to tell it what to do if the condition isn't met:
$number=6
if($number==5)
print("five is an awesome number");
else
print("the number ain't five!");
In that case it'll print "the number ain't five!".
To print the current value of the variable, just say print($variable); if you want to print some text say print("text ololol blah blah");
I can't explain all of PHP in one post obviously but that'll get you started, also here are some things that'll stump you unless you know them because they're obscure but vital:
If you're printing something with quotation marks in it that you want to be visible, like "Denial ain't just a river in Egypt." - Mark Twain, then use ' instead of " to enclose it in print('text');.
If you want to include multiple actions as a result of an if statement, they have to be in brackets {}:
if($stuff="something")
{
print("woooo");
print("thing maybe");
$morestuff="leg";
};
You'll need to install a PHP processor (the part of Mac OS X's webserver that renders the code into HTML); Entropy.ch's PHP install is great. Just remember though if you're not accessing the files through a web browser from your Library/Webserver/Documents folder, they'll show as code and not the post-processed HTML.
I'd love to help you learn, ask all the questions you want and I'll try to answer them.