I am trying to remove eval()
from my code.
Currently I use:
eval( "$mkt_data" . $branch . " = $xyz" );
to assign $xyz
(which is also a multidimensional array) to the specific branch of $mkt_data
.
$branch can be 1, 2 or 3 levels deep, i.e.
$branch = "['mkt1']['offer']['bid']";
or
$branch = "['status']";
is there a clever way to do this?