Welcome Guest, Not a member yet? Register   Sign In
JSON to Array Data
#1

My Javascript gives me this 

PHP Code:
{"year":"2078","leave_count":"6","month":"11","branch_id":"","department_id":"","allowance_count":"1","deduction_count":"1","expand_collapse":"collapse","pf_count":"0","ssf_count":"0","enrollID[1515]":"29","basic_salary[1515]":"34500","allowance[1515][16]":"0","gross_income[1515]":"0","deduction[1515][14]":"0","total_deduction[1515]":"0","perday_basic_salary[1515]":"1150","perday_allowance[1515]":"0","total_perday_salary[1515]":"1150","present[1515]":"20","holiday[1515]":"0","weekend[1515]":"4","t_present[1515]":"24","leave[1515][CL]":"0","leave[1515][SL]":"0","leave[1515][ML]":"0","leave[1515][PL]":"0","leave[1515][KL]":"0","leave[1515][OL]":"0","t_leave[1515]":"0","overtime[1515]":"0","absent_days[1515]":"6","paid_basic_salary[1515]":"27600","paid_allowance[1515]":"0","total_overtime[1515]":"0","all_deduction[1515]":"0","gross_salary[1515]":"27600","taxable_salary[1515]":"27600","tds[1515]":"276","total_salary[1515]":"27324","advance_amount[1515]":"0","net_payable[1515]":"27324","enrollID[1527]":"44","basic_salary[1527]":"12000","allowance[1527][16]":"0","gross_income[1527]":"0","deduction[1527][14]":"0","total_deduction[1527]":"0","perday_basic_salary[1527]":"400","perday_allowance[1527]":"0","total_perday_salary[1527]":"400","present[1527]":"24","holiday[1527]":"0","weekend[1527]":"4","t_present[1527]":"28","leave[1527][CL]":"0","leave[1527][SL]":"0","leave[1527][ML]":"0","leave[1527][PL]":"0","leave[1527][KL]":"0","leave[1527][OL]":"0","t_leave[1527]":"0","overtime[1527]":"0","absent_days[1527]":"2","paid_basic_salary[1527]":"11200","paid_allowance[1527]":"0","total_overtime[1527]":"0","all_deduction[1527]":"0","gross_salary[1527]":"11200","taxable_salary[1527]":"11200","tds[1527]":"112","total_salary[1527]":"11088","advance_amount[1527]":"0","net_payable[1527]":"11088","enrollID[1507]":"21","basic_salary[1507]":"21000","allowance[1507][16]":"0","gross_income[1507]":"0","deduction[1507][14]":"0","total_deduction[1507]":"0","perday_basic_salary[1507]":"700","perday_allowance[1507]":"0","total_perday_salary[1507]":"700","present[1507]":"21","holiday[1507]":"0","weekend[1507]":"4","t_present[1507]":"25","leave[1507][CL]":"0","leave[1507][SL]":"0","leave[1507][ML]":"0","leave[1507][PL]":"0","leave[1507][KL]":"0","leave[1507][OL]":"0","t_leave[1507]":"0","overtime[1507]":"0","absent_days[1507]":"5","paid_basic_salary[1507]":"17500","paid_allowance[1507]":"0","total_overtime[1507]":"0","all_deduction[1507]":"0","gross_salary[1507]":"17500","taxable_salary[1507]":"17500","tds[1507]":"175","total_salary[1507]":"17325","advance_amount[1507]":"0","net_payable[1507]":"17325","enrollID[1490]":"4","basic_salary[1490]":"12000","allowance[1490][16]":"0","gross_income[1490]":"0","deduction[1490][14]":"0","total_deduction[1490]":"0","perday_basic_salary[1490]":"400","perday_allowance[1490]":"0","total_perday_salary[1490]":"400","present[1490]":"24","holiday[1490]":"0","weekend[1490]":"4","t_present[1490]":"28","leave[1490][CL]":"0","leave[1490][SL]":"0","leave[1490][ML]":"0","leave[1490][PL]":"0","leave[1490][KL]":"0","leave[1490][OL]":"0","t_leave[1490]":"0","overtime[1490]":"0","absent_days[1490]":"2","paid_basic_salary[1490]":"11200","paid_allowance[1490]":"0","total_overtime[1490]":"0","all_deduction[1490]":"0","gross_salary[1490]":"11200","taxable_salary[1490]":"11200","tds[1490]":"112","total_salary[1490]":"11088","advance_amount[1490]":"0","net_payable[1490]":"11088","enrollID[1503]":"17","basic_salary[1503]":"15400","allowance[1503][16]":"0","gross_income[1503]":"0","deduction[1503][14]":"0","total_deduction[1503]":"0","perday_basic_salary[1503]":"513.33333333333","perday_allowance[1503]":"0","total_perday_salary[1503]":"513.33","present[1503]":"26","holiday[1503]":"0","weekend[1503]":"4","t_present[1503]":"30","leave[1503][CL]":"0","leave[1503][SL]":"0","leave[1503][ML]":"0","leave[1503][PL]":"0","leave[1503][KL]":"0","leave[1503][OL]":"0","t_leave[1503]":"0","overtime[1503]":"0","absent_days[1503]":"0","paid_basic_salary[1503]":"15400","paid_allowance[1503]":"0","total_overtime[1503]":"0","all_deduction[1503]":"0","gross_salary[1503]":"15400","taxable_salary[1503]":"15400","tds[1503]":"154","total_salary[1503]":"15246","advance_amount[1503]":"0","net_payable[1503]":"15246","enrollID[1487]":"1","basic_salary[1487]":"34500","allowance[1487][16]":"0","gross_income[1487]":"0","deduction[1487][14]":"0","total_deduction[1487]":"0","perday_basic_salary[1487]":"1150","perday_allowance[1487]":"0","total_perday_salary[1487]":"1150","present[1487]":"26","holiday[1487]":"0","weekend[1487]":"4","t_present[1487]":"30","leave[1487][CL]":"0","leave[1487][SL]":"0","leave[1487][ML]":"0","leave[1487][PL]":"0","leave[1487][KL]":"0","leave[1487][OL]":"0","t_leave[1487]":"0","overtime[1487]":"0","absent_days[1487]":"0","paid_basic_salary[1487]":"34500","paid_allowance[1487]":"0","total_overtime[1487]":"0","all_deduction[1487]":"0","gross_salary[1487]":"34500","taxable_salary[1487]":"34500","tds[1487]":"345","total_salary[1487]":"34155","advance_amount[1487]":"0","net_payable[1487]":"34155","enrollID[1508]":"22","basic_salary[1508]":"12000","allowance[1508][16]":"0","gross_income[1508]":"0","deduction[1508][14]":"0","total_deduction[1508]":"0","perday_basic_salary[1508]":"400","perday_allowance[1508]":"0","total_perday_salary[1508]":"400","present[1508]":"23","holiday[1508]":"0","weekend[1508]":"4","t_present[1508]":"27","leave[1508][CL]":"0","leave[1508][SL]":"0","leave[1508][ML]":"0","leave[1508][PL]":"0","leave[1508][KL]":"0","leave[1508][OL]":"0","t_leave[1508]":"0","overtime[1508]":"0","absent_days[1508]":"3","paid_basic_salary[1508]":"10800","paid_allowance[1508]":"0","total_overtime[1508]":"0","all_deduction[1508]":"0","gross_salary[1508]":"10800","taxable_salary[1508]":"10800","tds[1508]":"108","total_salary[1508]":"10692","advance_amount[1508]":"0","net_payable[1508]":"10692","enrollID[1499]":"13","basic_salary[1499]":"16000","allowance[1499][16]":"0","gross_income[1499]":"0","deduction[1499][14]":"0","total_deduction[1499]":"0","perday_basic_salary[1499]":"533.33333333333","perday_allowance[1499]":"0","total_perday_salary[1499]":"533.33","present[1499]":"22","holiday[1499]":"0","weekend[1499]":"4","t_present[1499]":"26","leave[1499][CL]":"0","leave[1499][SL]":"0","leave[1499][ML]":"0","leave[1499][PL]":"0","leave[1499][KL]":"0","leave[1499][OL]":"0","t_leave[1499]":"0","overtime[1499]":"0","absent_days[1499]":"4","paid_basic_salary[1499]":"13867","paid_allowance[1499]":"0","total_overtime[1499]":"0","all_deduction[1499]":"0","gross_salary[1499]":"13867","taxable_salary[1499]":"13867","tds[1499]":"138.67","total_salary[1499]":"13728.33","advance_amount[1499]":"0","net_payable[1499]":"13728.33","enrollID[1501]":"15","basic_salary[1501]":"16000","allowance[1501][16]":"0","gross_income[1501]":"0","deduction[1501][14]":"0","total_deduction[1501]":"0","perday_basic_salary[1501]":"533.33333333333","perday_allowance[1501]":"0","total_perday_salary[1501]":"533.33","present[1501]":"21","holiday[1501]":"0","weekend[1501]":"4","t_present[1501]":"25","leave[1501][CL]":"0","leave[1501][SL]":"0","leave[1501][ML]":"0","leave[1501][PL]":"0","leave[1501][KL]":"0","leave[1501][OL]":"0","t_leave[1501]":"0","overtime[1501]":"0","absent_days[1501]":"5","paid_basic_salary[1501]":"13333","paid_allowance[1501]":"0","total_overtime[1501]":"0","all_deduction[1501]":"0","gross_salary[1501]":"13333","taxable_salary[1501]":"13333","tds[1501]":"133.33","total_salary[1501]":"13199.67","advance_amount[1501]":"0","net_payable[1501]":"13199.67","enrollID[1538]":"58","basic_salary[1538]":"8000","allowance[1538][16]":"0","gross_income[1538]":"0","deduction[1538][14]":"0","total_deduction[1538]":"0","perday_basic_salary[1538]":"266.66666666667","perday_allowance[1538]":"0","total_perday_salary[1538]":"266.67","present[1538]":"17","holiday[1538]":"0","weekend[1538]":"4","t_present[1538]":"21","leave[1538][CL]":"0","leave[1538][SL]":"0","leave[1538][ML]":"0","leave[1538][PL]":"0","leave[1538][KL]":"0","leave[1538][OL]":"0","t_leave[1538]":"0","overtime[1538]":"0","absent_days[1538]":"9","paid_basic_salary[1538]":"5600","paid_allowance[1538]":"0","total_overtime[1538]":"0","all_deduction[1538]":"0","gross_salary[1538]":"5600","taxable_salary[1538]":"5600","tds[1538]":"56","total_salary[1538]":"5544","advance_amount[1538]":"0","net_payable[1538]":"5544","enrollID[1521]":"36","basic_salary[1521]":"15000","allowance[1521][16]":"0","gross_income[1521]":"0","deduction[1521][14]":"0","total_deduction[1521]":"0","perday_basic_salary[1521]":"500","perday_allowance[1521]":"0","total_perday_salary[1521]":"500","present[1521]":"0","holiday[1521]":"0","weekend[1521]":"4","t_present[1521]":"4","leave[1521][CL]":"0","leave[1521][SL]":"0","leave[1521][ML]":"0","leave[1521][PL]":"0","leave[1521][KL]":"0","leave[1521][OL]":"0","t_leave[1521]":"0","overtime[1521]":"0","absent_days[1521]":"30","paid_basic_salary[1521]":"0","total_overtime[1521]":"0","all_deduction[1521]":"0","gross_salary[1521]":"0","taxable_salary[1521]":"0","tds[1521]":"0","total_salary[1521]":"0","advance_amount[1521]":"0","net_payable[1521]":"0","enrollID[1500]":"14","basic_salary[1500]":"12500","allowance[1500][16]":"0","gross_income[1500]":"0","deduction[1500][14]":"0","total_deduction[1500]":"0","perday_basic_salary[1500]":"416.66666666667","perday_allowance[1500]":"0","total_perday_salary[1500]":"416.67","present[1500]":"20","holiday[1500]":"0","weekend[1500]":"4","t_present[1500]":"24","leave[1500][CL]":"0","leave[1500][SL]":"0","leave[1500][ML]":"0","leave[1500][PL]":"0","leave[1500][KL]":"0","leave[1500][OL]":"0","t_leave[1500]":"0","overtime[1500]":"0","absent_days[1500]":"6","paid_basic_salary[1500]":"10000","paid_allowance[1500]":"0","total_overtime[1500]":"0","all_deduction[1500]":"0","gross_salary[1500]":"10000","taxable_salary[1500]":"10000","tds[1500]":"100","total_salary[1500]":"9900","advance_amount[1500]":"0","net_payable[1500]":"9900","enrollID[1520]":"35","basic_salary[1520]":"11000","allowance[1520][16]":"0","gross_income[1520]":"0","deduction[1520][14]":"0","total_deduction[1520]":"0","perday_basic_salary[1520]":"366.66666666667","perday_allowance[1520]":"0","total_perday_salary[1520]":"366.67","present[1520]":"24","holiday[1520]":"0","weekend[1520]":"4","t_present[1520]":"28","leave[1520][CL]":"0","leave[1520][SL]":"0","leave[1520][ML]":"0","leave[1520][PL]":"0","leave[1520][KL]":"0","leave[1520][OL]":"0","t_leave[1520]":"0","overtime[1520]":"0","absent_days[1520]":"2","paid_basic_salary[1520]":"10267","paid_allowance[1520]":"0","total_overtime[1520]":"0","all_deduction[1520]":"0","gross_salary[1520]":"10267","taxable_salary[1520]":"10267","tds[1520]":"102.67","total_salary[1520]":"10164.33","advance_amount[1520]":"0","net_payable[1520]":"10164.33","enrollID[1530]":"42","basic_salary[1530]":"40000","allowance[1530][16]":"0","gross_income[1530]":"0","deduction[1530][14]":"0","total_deduction[1530]":"0","perday_basic_salary[1530]":"1333.3333333333","perday_allowance[1530]":"0","total_perday_salary[1530]":"1333.33","present[1530]":"0","holiday[1530]":"0","weekend[1530]":"4","t_present[1530]":"4","leave[1530][CL]":"0","leave[1530][SL]":"0","leave[1530][ML]":"0","leave[1530][PL]":"0","leave[1530][KL]":"0","leave[1530][OL]":"0","t_leave[1530]":"0","overtime[1530]":"0","absent_days[1530]":"30","paid_basic_salary[1530]":"0","total_overtime[1530]":"0","all_deduction[1530]":"0","gross_salary[1530]":"0","taxable_salary[1530]":"0","tds[1530]":"0","total_salary[1530]":"0","advance_amount[1530]":"0","net_payable[1530]":"0","enrollID[1534]":"54","basic_salary[1534]":"31700","allowance[1534][16]":"0","gross_income[1534]":"0"


and in php when json decode it gives me this
PHP Code:
stdClass Object
(
    [year] => 2078
    
[leave_count] => 6
    
[month] => 11
    
[branch_id] => 
    [department_id] => 
    [allowance_count] => 1
    
[deduction_count] => 1
    
[expand_collapse] => collapse
    
[pf_count] => 0
    
[ssf_count] => 0
    
[enrollID[1515]] => 29
    
[basic_salary[1515]] => 34500
    
[allowance[1515][16]] => 0
    
[gross_income[1515]] => 0
    
[deduction[1515][14]] => 0
    
[total_deduction[1515]] => 0
    
[perday_basic_salary[1515]] => 1150
    
[perday_allowance[1515]] => 0
    
[total_perday_salary[1515]] => 1150
    
[present[1515]] => 20
    
[holiday[1515]] => 0
    
[weekend[1515]] => 4
    
[t_present[1515]] => 24
    
[leave[1515][CL]] => 0
    
[leave[1515][SL]] => 0
    
[leave[1515][ML]] => 0
    
[leave[1515][PL]] => 0
    
[leave[1515][KL]] => 0
    
[leave[1515][OL]] => 0
    
[t_leave[1515]] => 0
    
[overtime[1515]] => 0
    
[absent_days[1515]] => 6
    
[paid_basic_salary[1515]] => 27600
    
[paid_allowance[1515]] => 0
    
[total_overtime[1515]] => 0
    
[all_deduction[1515]] => 0
    
[gross_salary[1515]] => 27600
    
[taxable_salary[1515]] => 27600
    
[tds[1515]] => 276
    
[total_salary[1515]] => 27324
    
[advance_amount[1515]] => 0
    
[net_payable[1515]] => 27324
    
[enrollID[1527]] => 44
    
[basic_salary[1527]] => 12000
    
[allowance[1527][16]] => 0
    
[gross_income[1527]] => 0
    
[deduction[1527][14]] => 0
    
[total_deduction[1527]] => 0
    
[perday_basic_salary[1527]] => 400
    
[perday_allowance[1527]] => 0
    
[total_perday_salary[1527]] => 400
    
[present[1527]] => 24
    
[holiday[1527]] => 0
    
[weekend[1527]] => 4
    
[t_present[1527]] => 28
    
[leave[1527][CL]] => 0
    
[leave[1527][SL]] => 0
    
[leave[1527][ML]] => 0
    
[leave[1527][PL]] => 0
    
[leave[1527][KL]] => 0
    
[leave[1527][OL]] => 0
    
[t_leave[1527]] => 0
    
[overtime[1527]] => 0
    
[absent_days[1527]] => 2
    
[paid_basic_salary[1527]] => 11200
    
[paid_allowance[1527]] => 0
    
[total_overtime[1527]] => 0
    
[all_deduction[1527]] => 0
    
[gross_salary[1527]] => 11200
    
[taxable_salary[1527]] => 11200
    
[tds[1527]] => 112
    
[total_salary[1527]] => 11088
    
[advance_amount[1527]] => 0
    
[net_payable[1527]] => 11088
    
[enrollID[1507]] => 21
    
[basic_salary[1507]] => 21000
    
[allowance[1507][16]] => 0
    
[gross_income[1507]] => 0
    
[deduction[1507][14]] => 0
    
[total_deduction[1507]] => 0
    
[perday_basic_salary[1507]] => 700
    
[perday_allowance[1507]] => 0
    
[total_perday_salary[1507]] => 700
    
[present[1507]] => 21
    
[holiday[1507]] => 0
    
[weekend[1507]] => 4
    
[t_present[1507]] => 25
    
[leave[1507][CL]] => 0
    
[leave[1507][SL]] => 0
    
[leave[1507][ML]] => 0
    
[leave[1507][PL]] => 0
    
[leave[1507][KL]] => 0
    
[leave[1507][OL]] => 0
    
[t_leave[1507]] => 0
    
[overtime[1507]] => 0
    
[absent_days[1507]] => 5
    
[paid_basic_salary[1507]] => 17500
    
[paid_allowance[1507]] => 0
    
[total_overtime[1507]] => 0
    
[all_deduction[1507]] => 0
    
[gross_salary[1507]] => 17500
    
[taxable_salary[1507]] => 17500
    
[tds[1507]] => 175
    
[total_salary[1507]] => 17325
    
[advance_amount[1507]] => 0
    
[net_payable[1507]] => 17325
    
[enrollID[1490]] => 4
    
[basic_salary[1490]] => 12000
    
[allowance[1490][16]] => 0
    
[gross_income[1490]] => 0
    
[deduction[1490][14]] => 0
    
[total_deduction[1490]] => 0
    
[perday_basic_salary[1490]] => 400
    
[perday_allowance[1490]] => 0
    
[total_perday_salary[1490]] => 400
    
[present[1490]] => 24
    
[holiday[1490]] => 0
    
[weekend[1490]] => 4
    
[t_present[1490]] => 28
    
[leave[1490][CL]] => 0
    
[leave[1490][SL]] => 0
    
[leave[1490][ML]] => 0
    
[leave[1490][PL]] => 0
    
[leave[1490][KL]] => 0
    
[leave[1490][OL]] => 0
    
[t_leave[1490]] => 0
    
[overtime[1490]] => 0
    
[absent_days[1490]] => 2
    
[paid_basic_salary[1490]] => 11200
    
[paid_allowance[1490]] => 0
    
[total_overtime[1490]] => 0
    
[all_deduction[1490]] => 0
    
[gross_salary[1490]] => 11200
    
[taxable_salary[1490]] => 11200
    
[tds[1490]] => 112
    
[total_salary[1490]] => 11088
    
[advance_amount[1490]] => 0
    
[net_payable[1490]] => 11088
    
[enrollID[1503]] => 17
    
[basic_salary[1503]] => 15400
    
[allowance[1503][16]] => 0
    
[gross_income[1503]] => 0
    
[deduction[1503][14]] => 0
    
[total_deduction[1503]] => 0
    
[perday_basic_salary[1503]] => 513.33333333333
    
[perday_allowance[1503]] => 0
    
[total_perday_salary[1503]] => 513.33
    
[present[1503]] => 26
    
[holiday[1503]] => 0
    
[weekend[1503]] => 4
    
[t_present[1503]] => 30
    
[leave[1503][CL]] => 0
    
[leave[1503][SL]] => 0
    
[leave[1503][ML]] => 0
    
[leave[1503][PL]] => 0
    
[leave[1503][KL]] => 0
    
[leave[1503][OL]] => 0
    
[t_leave[1503]] => 0
    
[overtime[1503]] => 0
    
[absent_days[1503]] => 0
    
[paid_basic_salary[1503]] => 15400
    
[paid_allowance[1503]] => 0
    
[total_overtime[1503]] => 0
    
[all_deduction[1503]] => 0
    
[gross_salary[1503]] => 15400
    
[taxable_salary[1503]] => 15400
    
[tds[1503]] => 154
    
[total_salary[1503]] => 15246
    
[advance_amount[1503]] => 0
    
[net_payable[1503]] => 15246
    
[enrollID[1487]] => 1
    
[basic_salary[1487]] => 34500
    
[allowance[1487][16]] => 0
    
[gross_income[1487]] => 0
    
[deduction[1487][14]] => 0
    
[total_deduction[1487]] => 0
    
[perday_basic_salary[1487]] => 1150
    
[perday_allowance[1487]] => 0
    
[total_perday_salary[1487]] => 1150
    
[present[1487]] => 26
    
[holiday[1487]] => 0
    
[weekend[1487]] => 4
    
[t_present[1487]] => 30
    
[leave[1487][CL]] => 0
    
[leave[1487][SL]] => 0
    
[leave[1487][ML]] => 0
    
[leave[1487][PL]] => 0
    
[leave[1487][KL]] => 0
    
[leave[1487][OL]] => 0
    
[t_leave[1487]] => 0
    
[overtime[1487]] => 0
    
[absent_days[1487]] => 0
    
[paid_basic_salary[1487]] => 34500
    
[paid_allowance[1487]] => 0
    
[total_overtime[1487]] => 0
    
[all_deduction[1487]] => 0
    
[gross_salary[1487]] => 34500
    
[taxable_salary[1487]] => 34500
    
[tds[1487]] => 345
    
[total_salary[1487]] => 34155
    
[advance_amount[1487]] => 0
    
[net_payable[1487]] => 34155
    
[enrollID[1508]] => 22
    
[basic_salary[1508]] => 12000
    
[allowance[1508][16]] => 0
    
[gross_income[1508]] => 0
    
[deduction[1508][14]] => 0
    
[total_deduction[1508]] => 0
    
[perday_basic_salary[1508]] => 400
    
[perday_allowance[1508]] => 0
    
[total_perday_salary[1508]] => 400
    
[present[1508]] => 23
    
[holiday[1508]] => 0
    
[weekend[1508]] => 4
    
[t_present[1508]] => 27
    
[leave[1508][CL]] => 0
    
[leave[1508][SL]] => 0
    
[leave[1508][ML]] => 0
    
[leave[1508][PL]] => 0
    
[leave[1508][KL]] => 0
    
[leave[1508][OL]] => 0
    
[t_leave[1508]] => 0
    
[overtime[1508]] => 0
    
[absent_days[1508]] => 3
    
[paid_basic_salary[1508]] => 10800
    
[paid_allowance[1508]] => 0
    
[total_overtime[1508]] => 0
    
[all_deduction[1508]] => 0
    
[gross_salary[1508]] => 10800
    
[taxable_salary[1508]] => 10800
    
[tds[1508]] => 108
    
[total_salary[1508]] => 10692
    
[advance_amount[1508]] => 0
    
[net_payable[1508]] => 10692
    
[enrollID[1499]] => 13
    
[basic_salary[1499]] => 16000
    
[allowance[1499][16]] => 0
    
[gross_income[1499]] => 0
    
[deduction[1499][14]] => 0
    
[total_deduction[1499]] => 0
    
[perday_basic_salary[1499]] => 533.33333333333
    
[perday_allowance[1499]] => 0
    
[total_perday_salary[1499]] => 533.33
    
[present[1499]] => 22
    
[holiday[1499]] => 0
    
[weekend[1499]] => 4
    
[t_present[1499]] => 26
    
[leave[1499][CL]] => 0
    
[leave[1499][SL]] => 0
    
[leave[1499][ML]] => 0
    
[leave[1499][PL]] => 0
    
[leave[1499][KL]] => 0
    
[leave[1499][OL]] => 0
    
[t_leave[1499]] => 0
    
[overtime[1499]] => 0
    
[absent_days[1499]] => 4
    
[paid_basic_salary[1499]] => 13867
    
[paid_allowance[1499]] => 0
    
[total_overtime[1499]] => 0
    
[all_deduction[1499]] => 0
    
[gross_salary[1499]] => 13867
    
[taxable_salary[1499]] => 13867
    
[tds[1499]] => 138.67
    
[total_salary[1499]] => 13728.33
    
[advance_amount[1499]] => 0
    
[net_payable[1499]] => 13728.33
    
[enrollID[1501]] => 15
    
[basic_salary[1501]] => 16000
    
[allowance[1501][16]] => 0
    
[gross_income[1501]] => 0
    
[deduction[1501][14]] => 0
    
[total_deduction[1501]] => 0
    
[perday_basic_salary[1501]] => 533.33333333333
    
[perday_allowance[1501]] => 0
    
[total_perday_salary[1501]] => 533.33
    
[present[1501]] => 21
    
[holiday[1501]] => 0
    
[weekend[1501]] => 4
    
[t_present[1501]] => 25
    
[leave[1501][CL]] => 0
    
[leave[1501][SL]] => 0
    
[leave[1501][ML]] => 0
    
[leave[1501][PL]] => 0
    
[leave[1501][KL]] => 0
    
[leave[1501][OL]] => 0
    
[t_leave[1501]] => 0
    
[overtime[1501]] => 0
    
[absent_days[1501]] => 5
    
[paid_basic_salary[1501]] => 13333
    
[paid_allowance[1501]] => 0
    
[total_overtime[1501]] => 0
    
[all_deduction[1501]] => 0
    
[gross_salary[1501]] => 13333
    
[taxable_salary[1501]] => 13333
    
[tds[1501]] => 133.33
    
[total_salary[1501]] => 13199.67
    
[advance_amount[1501]] => 0
    
[net_payable[1501]] => 13199.67
    
[enrollID[1538]] => 58
    
[basic_salary[1538]] => 8000
    
[allowance[1538][16]] => 0
    
[gross_income[1538]] => 0
    
[deduction[1538][14]] => 0
    
[total_deduction[1538]] => 0
    
[perday_basic_salary[1538]] => 266.66666666667
    
[perday_allowance[1538]] => 0
    
[total_perday_salary[1538]] => 266.67
    
[present[1538]] => 17
    
[holiday[1538]] => 0
    
[weekend[1538]] => 4
    
[t_present[1538]] => 21
    
[leave[1538][CL]] => 0
    
[leave[1538][SL]] => 0
    
[leave[1538][ML]] => 0
    
[leave[1538][PL]] => 0
    
[leave[1538][KL]] => 0
    
[leave[1538][OL]] => 0
    
[t_leave[1538]] => 0
    
[overtime[1538]] => 0
    
[absent_days[1538]] => 9
    
[paid_basic_salary[1538]] => 5600
    
[paid_allowance[1538]] => 0
    
[total_overtime[1538]] => 0
    
[all_deduction[1538]] => 0
    
[gross_salary[1538]] => 5600
    
[taxable_salary[1538]] => 5600
    
[tds[1538]] => 56
    
[total_salary[1538]] => 5544
    
[advance_amount[1538]] => 0
    
[net_payable[1538]] => 5544
    
[enrollID[1521]] => 36
    
[basic_salary[1521]] => 15000
    
[allowance[1521][16]] => 0
    
[gross_income[1521]] => 0
    
[deduction[1521][14]] => 0
    
[total_deduction[1521]] => 0
    
[perday_basic_salary[1521]] => 500
    
[perday_allowance[1521]] => 0
    
[total_perday_salary[1521]] => 500
    
[present[1521]] => 0
    
[holiday[1521]] => 0
    
[weekend[1521]] => 4
    
[t_present[1521]] => 4
    
[leave[1521][CL]] => 0
    
[leave[1521][SL]] => 0
    
[leave[1521][ML]] => 0
    
[leave[1521][PL]] => 0
    
[leave[1521][KL]] => 0
    
[leave[1521][OL]] => 0
    
[t_leave[1521]] => 0
    
[overtime[1521]] => 0
    
[absent_days[1521]] => 30
    
[paid_basic_salary[1521]] => 0
    
[total_overtime[1521]] => 0
    
[all_deduction[1521]] => 0
    
[gross_salary[1521]] => 0
    
[taxable_salary[1521]] => 0
    
[tds[1521]] => 0
    
[total_salary[1521]] => 0
    
[advance_amount[1521]] => 0
    
[net_payable[1521]] => 0
    
[enrollID[1500]] => 14
    
[basic_salary[1500]] => 12500
    
[allowance[1500][16]] => 0
    
[gross_income[1500]] => 0
    
[deduction[1500][14]] => 0
    
[total_deduction[1500]] => 0
    
[perday_basic_salary[1500]] => 416.66666666667
    
[perday_allowance[1500]] => 0
    
[total_perday_salary[1500]] => 416.67
    
[present[1500]] => 20
    
[holiday[1500]] => 0
    
[weekend[1500]] => 4
    
[t_present[1500]] => 24
    
[leave[1500][CL]] => 0
    
[leave[1500][SL]] => 0
    
[leave[1500][ML]] => 0
    
[leave[1500][PL]] => 0
    
[leave[1500][KL]] => 0
    
[leave[1500][OL]] => 0
    
[t_leave[1500]] => 0
    
[overtime[1500]] => 0
    
[absent_days[1500]] => 6
    
[paid_basic_salary[1500]] => 10000
    
[paid_allowance[1500]] => 0
    
[total_overtime[1500]] => 0

    


But I want it to be like multidimensional array what am I doing wrong. Or it is possible to change it like multidimensional array.
PS. The json and array are not fully provided because of text limit
Reply
Reply
#3

I know that what i want is something like this
PHP Code:
[enrollID[1515]] => 29
    
[basic_salary[1515]] => 34500
    
[allowance[1515][16]] => 0

 change to 
   enrollID 
=> array(
     
1515 => 29,
), 
basic_salary => array(
  
1515 => 34500,
),

allowance => array(
    
1515 => array(
        
16 => 0
    
)

Reply
#4

(This post was last modified: 04-08-2022, 03:46 AM by luckmoshy.)

(04-08-2022, 12:16 AM)lazyme114 Wrote: I know that what i want is something like this
PHP Code:
    [enrollID[1515]] => 29
    
[basic_salary[1515]] => 34500
    
[allowance[1515][16]] => 0

 change to 
  enrollID 
=> array(
    1515 => 29,
), 
basic_salary => array(
  1515 => 34500,
),

allowance => array(
    1515 => array(
        16 => 0
    
)



give it a measure
PHP Code:
var_dump(json_encode($jsontrue4)); 

for more --->https://www.php.net/manual/en/function.json-decode.php
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#5

@luckmoshy thanks for the reply. It seems my problem is not it decoding the data, its when encoding it. I changed the method of encoding it and now it works fine. Thanks anyway.
Reply
#6

(04-08-2022, 12:16 AM)lazyme114 Wrote: I know that what i want is something like this
PHP Code:
    [enrollID[1515]] => 29
    
[basic_salary[1515]] => 34500
    
[allowance[1515][16]] => 0

 change to 
  enrollID 
=> array(
    1515 => 29,
), 
basic_salary => array(
  1515 => 34500,
),

allowance => array(
    1515 => array(
        16 => 0
    
)



give it a measure 
PHP Code:
var_dump(json_decode($jsontrue4)); 

for more Like Above--->https://www.php.net/manual/en/function.json-decode.php
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply




Theme © iAndrew 2016 - Forum software by © MyBB