Functions.
Posted: Mon Dec 01, 2003 3:59 pm
Hi all,
First time poster, go easy
Quick one for you all. When writing a functions would it be better to send the $variables from an HTML form through the function or as global.
I hope this makes sense, as I am learning...
eg:
or
First time poster, go easy
Quick one for you all. When writing a functions would it be better to send the $variables from an HTML form through the function or as global.
I hope this makes sense, as I am learning...
eg:
Code: Select all
function foo($apples,$pears,$lemons) {
code..
}Code: Select all
function foo() {
global $apples,$pears,$lemons;
code..
}