Marlon_Br
08-04-2006, 09:39 AM
Hi, I want to use a variable that was created in one function in another function,,, how can I do that?
I´ve tried :
<?php
$a = NULL;
function test1()
{
global $a;
$a = "Anything";
}
function test2(){
echo $a;
}
test1();
test2();
?>
and it doens´t work...
I´ve tried :
<?php
$a = NULL;
function test1()
{
global $a;
$a = "Anything";
}
function test2(){
echo $a;
}
test1();
test2();
?>
and it doens´t work...