Hi,
I want to tidy my code up a bit and in order to do that I need to break some
function down.
so if I have something like
function function_1()
{
$foo = 0;
$bar = 1;
$foobar = $foo + $foo
echo $foobar;
}
and I want to split it in two functions I would maybe get
function function_2()
{
$foobar = $foo + $foo
echo $foobar;
}
function function_1()
{
$foo = 0;
$bar = 1;
function function_2()
}
But of course the problem is that function_2 does not know what $foo and
$bar are equal to because the values are not global.
But how could I make function_2 know about the values defined in
function_1()?
The purpose is just to clean up the code so I do not want to do anything
that might be a security problem.
Many thanks in advance.
Sims