redfroc
12-01-2007, 05:46 AM
Dear all,
how to call variable from function to another function or global section?
class first_class{
function sayHello(){
print "hello <br />";
$me = "this is me <br />";
}
function sayHelloToo(){
print "hello too <br />";
print "you said: " . $me;
$you = " and i see you";
}
}
$obj = new first_class();
$obj->sayHello();
print $me;
$obj->sayHelloToo();
print $you;
It can't return the values. :(
Thank you.
how to call variable from function to another function or global section?
class first_class{
function sayHello(){
print "hello <br />";
$me = "this is me <br />";
}
function sayHelloToo(){
print "hello too <br />";
print "you said: " . $me;
$you = " and i see you";
}
}
$obj = new first_class();
$obj->sayHello();
print $me;
$obj->sayHelloToo();
print $you;
It can't return the values. :(
Thank you.