Jump to content

do the mail variables need to be called the right names?


Recommended Posts

The variable names in the documentation are there ONLY so that you can formally refer to one parameter or the other when discussing it and when reading its description further down the manual.If you were to ask us "what part of the message is the first argument?" we won't understand you instantly... we'll have to go check that the first argument is $to, and if this was the first time we're dealing with the mail() function, we'd also have to check exactly what the value of $to is supposed to represent (though in this case, the name of the argument itself is very self descriptive).When writing actual code, you can name your variables however you want. Just keep track of what each variable is supposed to contain, and use the same name you've chosen whenever you want the same thing (i.e. if you rename $to to $giraffe, rename every other $to occurance to $giraffe too).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...