I would like to pass a parameter to a function. However, inside this parameter, I use variables that are defined inside the function. For example:
<?php
function foo($var){
$test = "test";
echo $var;
}
foo($test);
?>
In this example, I would like for the function to print out "test". Of course, this returns an error. However, this is what I am trying to do.