Consider the below code to save data in array,
arr[]['name'] = 'hello';
arr[]['value'] = 2;
I am trying to store data in a 2 d array without mentioning the index. Consider the above name/value set, if i store like this.
Values are stored like
arr[0]['name'] = 'hello';
arr[1]['value'] = 2;
But below is the expected result
arr[0]['name'] = 'hello';
arr[0]['value'] = 2;
how do i do it without mentioning any index? is there any way to do this?
Thanks,
Balan