Merge PHP multidimensional-array on key, parent keys and depth. In other words an array to a binary search tree. -
i have array trying merge. merging dependent upon key, parent keys , depth of array. can manipulate array in number of ways achieve unique key values. outcome technically binary search tree. have attached 2 files json_in.txt have , json_out.txt want. notice json_in file has unique key names in order merge , json_out file has "name" , "children" keys. plan use preg_replace_all remove digits json string after array merged, if know better way great!
again, trying make json array in json_in.txt json_out.txt , can manipulate key of json_in whatever needed in order accomplish this.
Comments
Post a Comment