Welcome Guest, Not a member yet? Register   Sign In
Pass variable trough functions
#1

[eluser]Fantass[/eluser]
Hello!, well this is quick question but i dont have a clue how to solve


i want to do the next (example)

Code:
<?
class some extends CI_Class{
  
function index()
{
   $variable = 'hello world'; //some X variable
   $variabletopass = $variable; //the variable that i need to pass through.
}
function misc()
{
    $some = $this->index($variabletopass); //this is what im trying but i dont get nothing
    var_dump($some);
}
}

OUTPUT = undefined variable. Boolean Null.

I hope someone could help me thanks alooot!!

Best regards


Messages In This Thread
Pass variable trough functions - by El Forum - 02-07-2012, 12:40 AM
Pass variable trough functions - by El Forum - 02-07-2012, 01:02 AM
Pass variable trough functions - by El Forum - 02-07-2012, 11:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB