i want array nested base of digit/character who divide by dot
i already tried any method what i know but the result not show as i want
this is example what i want (base of this 3, 3.1, 3.1.1, 3.1.2, 3.1.3) nested array base number of character.
My current array:
array (
82 =>
array (
'APBKID' => '83',
'KodeRekening' => '3',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'PEMBIAYAAN',
'Anggaran' => '0',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
83 =>
array (
'APBKID' => '84',
'KodeRekening' => '3.1',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'Penerimaan Pembiayaan ',
'Anggaran' => '99475000',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
84 =>
array (
'APBKID' => '85',
'KodeRekening' => '3.1.1',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'SILPA ',
'Anggaran' => '99475000',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
85 =>
array (
'APBKID' => '86',
'KodeRekening' => '3.1.2',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'Pencairan Dana Cadangan ',
'Anggaran' => '0',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
86 =>
array (
'APBKID' => '87',
'KodeRekening' => '3.1.3',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'Hasil Kekayaan Desa Yang dipisahkan ',
'Anggaran' => '0',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
87 =>
array (
'APBKID' => '88',
'KodeRekening' => '3.2',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'Pengeluaran Pembiayaan ',
'Anggaran' => '0',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
88 =>
array (
'APBKID' => '89',
'KodeRekening' => '3.2.1',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'Pembentukan Dana Cadangan ',
'Anggaran' => '0',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
89 =>
array (
'APBKID' => '90',
'KodeRekening' => '3.2.2',
'LevelRekening' => NULL,
'KodeRekeningInduk' => NULL,
'Uraian' => 'Penyertaan Modal Desa ',
'Anggaran' => '0',
'Keterangan' => NULL,
'TahunAnggaran' => '2019',
'KampungID' => '1',
'DanaDesa' => NULL,
'AlokasiDanaDesa' => NULL,
'CreatedAt' => '2019-08-10 18: 20: 36',
'CreatedBy' => '1',
'UpdatedAt' => '2019-09-06 12: 31: 21',
'UpdatedBy' => '1',
'Deleted' => '0',
'DistrikID' => '1',
'NamaKampung' => 'Amungun',
'KepalaKampung' => 'Joni Niwilingame',
'FotoKepalaKampung' => '',
'KodeRegisterKampung' => '91.09.02',
'GambarKampung' => 'splash.jpg',
'ProfilKampung' => '<p><strong style="margin: 0px; padding: 0px; font-family: "Open Sans", Arial, sans-serif; text-align: justify;">Lorem Ipsum</strong><span style="font-family: "Open Sans", Arial, sans-serif; text-align: justify;"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span><br></p>',
),
Required Output:
{
"APBKID": "1404",
"KodeRekening": "3",
"LevelRekening": "",
"KodeRekeningInduk": "",
"Uraian": "PEMBIAYAAN",
"Anggaran": "",
"Keterangan": "",
"TahunAnggaran": "2019",
"DanaDesa": "",
"AlokasiDanaDesa": "",
"KampungID": "2",
"NamaKampung": "Aramsolki",
"Data": [
{
"APBKID": "1405",
"KodeRekening": "3.1",
"LevelRekening": "",
"KodeRekeningInduk": "",
"Uraian": "Penerimaan Pembiayaan ",
"Anggaran": "99475000",
"Keterangan": "",
"TahunAnggaran": "2019",
"DanaDesa": "",
"AlokasiDanaDesa": "",
"KampungID": "2",
"NamaKampung": "Aramsolki",
"Data": [
{
"APBKID": "1406",
"KodeRekening": "3.1.1",
"LevelRekening": "",
"KodeRekeningInduk": "",
"Uraian": "SILPA ",
"Anggaran": "99475000",
"Keterangan": "",
"TahunAnggaran": "2019",
"DanaDesa": "",
"AlokasiDanaDesa": "",
"KampungID": "2",
"NamaKampung": "Aramsolki"
},
{
"APBKID": "1407",
"KodeRekening": "3.1.2",
"LevelRekening": "",
"KodeRekeningInduk": "",
"Uraian": "Pencairan Dana Cadangan ",
"Anggaran": "",
"Keterangan": "",
"TahunAnggaran": "2019",
"DanaDesa": "",
"AlokasiDanaDesa": "",
"KampungID": "2",
"NamaKampung": "Aramsolki"
},
]
}
]
}
Does anyone know how to implement this?