Functions work like this
function sessionteam($myyear, $myteam){
return "It's $myear and the champion is $myteam";
}
return = the value to be returned when the function is called:
call it like
echo sessionteam(1964, 'yankees');
or
$mystring = sessionteam($someyear, $someguys);
You can also include default values:
function sessionteam($myyear=1969, $myteam='The NY Mets'){
If you call the function sessionteam without parameters:
echo sessionteam();
You get the defaults returned:
It's 1969 and the champion is The NY Mets!