Good Day.
Basically I'm trying to rename an array to a name that is a variable.
CODE:
in .php file: $NameToReturn = "StockQuote";
class name{
...
function name($NameToReturn)
...
$ReturnName = "$NameToReturn";
...
(line 57)$this->${$ReturnName}["$tokened"]["$i"] = "$value";
...
The result is the error:
Undefined variable: StockQuote line 57
So, the code:
$this->${$ReturnName}
does get filled in with the correct variable name, but it is undefined. Wish I knew how to define it!
I even tried just to rename the array:
(line 57)$this->element["$tokened"]["$i"] = "$value";
...
(line 84)${$ReturnName} = $this->element;
...
The result here is the same
Undefined variable: StockQuote line 84
HELP. Any suggestions? TIA -- dmayo