At some point in your PHP development you are likely to want to break repeated functionality out into a separate, well, function. Something that you’ll no doubt also want to do is pass information back and forward from these functions.
If you are familiar with scope in programming you will be aware that variables are typically only available where they are created. This means if you create a variable called $name in the main part of your code you would not be able to “see” this variable in a function unless you passed it across. The scope of the variable … Read the rest