I have a controller that has the next functions:
class controller {
function __construct(){
}
function myfunction(){
//here is my variable
$variable="hello"
}
function myotherfunction(){
//in this function I need to get the value $variable
$variable2=$variable
}
}
I thanks for your answers. How can I pass variables of a function to other function in a controller of codeigniter?