I was hoping Prime would, as my coding days are long behind me.
Then you'll probably find it pretty simple once you get a few reminders.
*
<?php &
?> are basically script tags telling the machine to start, and stop, reading the information as php programming. Also like pretty much always
// notes a comment for the machine to ignore.
*
$ must be used to denote a variable in php (and SQL).
To try and cross index here for you
C#:
string from_name = "Sin"; from_name += "fire"; would produce a string that equals Sinfire.
Javascript:
var from_name = "Sin"; from_name += "fire"; Same deal.
PHP:
$from_name = "Sin"; $from_Name += "fire"; only thing that has really changed is the $ marker.
It's intended for the writer to clearly know what is a variable because professional programming is all about making the most obscure code possible so they don't fire you and the guy that made PHP was sick of not knowing if IilIlliLI was the class and IilIliLI was a variable in one of his projects he was hired to fix (probably).
* String manipulation, pretty much every single language tries some stupid gimmick with strings.
In a more basic form,
$headers = $from_name + " <" + $from_email + ">"; produces
Sinfire <from_email@domain.com>PHP simply has the ability, thanks to that $ marker, to easily add the variables to a string so instead of building the string by adding things together you can simply use
"From: $from_name <$from_email>". When the string is read it simply gets the variable's values and compiles it all together.
And that's pretty much it. That If-Than-Else that calls the Mail method and kicks back an error message conveniently has a comment above it that says DON'T CHANGE THIS.