This is my case.(i changed my case)
I have variable let say $var1 from database and method test($var1)
$var1 = getFromDatabase();
//now $var1 contaion "This is new variable".$var2
Then in test method i will do simple string operation from the $var1 equation.
test($var1){
$var2 = "variable 2";
//I want to extract $var1 so that string will be combined
$value = $var1;
$value_expected = "This is new variable".$var2;
}
But $value will contain "This is new variable".$var2. I expect $value contain This is new variable variable 2 from the $var1 equation.
Is there any solution? Is that possible to do?
Thank You.