I have a string like below
"\$tempArray['acct'][0]".$det["PATH"]
$det["PATH"] is an dynamically generated in each iteration.
something like this "['e2']['2']['e2']['0']['e2']['0']"
I want an array to be defined like this
$tempArray['acct'][0]['e2']['2']['e2']['0']['e2']['0'] = array ();
Since $det["path"] changes in every iteration . I need this array to be created for in each iteration with the name
I have tried the below code . But it creates and array with $tmpArray. not like this $tempArray['acct'][0]['e2']['2']['e2']['0']['e2']['0']
if(!is_array("\$tempArray['acct'][0]".$det["PATH"])){
$tArray = "\$tempArray['acct'][0]".$det["PATH"];
var_dump($tArray );
$tArray = array();