I'm not quite sure of what you're talking about, but if you have a variable and want to use it in a function simple create function like this:
function somefunction($somevar) {
do something with $somevar // must be somevar because this isn't global, if you had specific variable to use, you'd use global $variable_name;
}
and then create variable such as $myVar = "whatever"; and do this to use $myVar in somefunction,
somefunction($myvar);
for example, echo 2 strings:
function echotwo($varone, $vartwo) {
echo $varone.' and '.$vartwo;
}
and then:
$textone = "PHP";
$texttwo = "mySQL";
echotwo($textone, $texttwo);
would echo PHP and mySQL
or should do that 🙂
Hope it helps, Arni