After the two-dimensional array is combined, the key name of the two-dimensional array is 0, not a string.
$ Arr = Array ([id] => 312355 [num] => 2231231 [url] => http://www.aba.com/add.php [name] => Forest [idNum] => 44090000000000 [pNum] => 18955501 [0] => Array ([cus] => aaa [amo] => 100 [fre] => 0 [Amount] => 100 [t] => 0 [me] => [Name] => ))
How to change the key name of $ arr [0] to $ arr ['AAA']
Reply to discussion (solution)
$arr['aaaa'] = $arr[0];unset($arr[0]);
Can you name it when merging?
It depends on how you merge it?
Or, it is written as aaa during merge.
Can you name it when merging?
Array_push ($ data, $ chiddenCI );
$ Data ['chiddenci'] = $ data [0];
Unset ($ data [0]);
Print_r ($ data );
It is merged through array_push.
You can use array_push to merge data.
Why?
Array_push ($ data, $ chiddenCI );
Just like this?
$ Data ['chiddenci'] = $ chiddenCI;
Why?
Array_push ($ data, $ chiddenCI );
Just like this?
$ Data ['chiddenci'] = $ chiddenCI;
Haha. yes. I am dizzy. it seems useless to sit and write code. I have to stand up and think about something.