I need to dynamically compute my multidimensional array keys for an aggegration in Elasticsearch.
I have the following
$aggs['aggs']['name']
But aggs and name needs to be populated in a loop. So for example:
$aggs['aggs']['name']['aggs'] = $glue;
// looping
$aggs['aggs']['name']['aggs']['name']['aggs'] = $glue;
// looping
$aggs['aggs']['name']['aggs']['name']['aggs']['name']['aggs'] = $glue;
// etc
The array keys needs to be computed with the keys aggs and name
How can i dynamically create keys in an array?
Thanks
aggs? and from 2nd adds[name][aggs]?