has an array.
$a=[
["id"=>1,name="w1"],
["id"=>4,name="w3"],
["id"=>3,name="w2"],
["id"=>5,name="w5"],
["id"=>6,name="w22"],
["id"=>8,name="w222"],
["id"=>30,name="w30"]
];
how did it become like this?
$a=[
["id"=>1, name="w1", "sn"=>11],
["id"=>4, name="w3", "sn"=>21],
["id"=>3, name="w2", "sn"=>22],
["id"=>5, name="w5", "sn"=>31],
["id"=>6, name="w22", "sn"=>32],
["id"=>8, name="w222","sn"=>33],
["id"=>30,name="w30", "sn"=>34]
];
The change of sn begins with the power of 2 to the power of 0, and the change begins with the change of 2 to the power of 2 and 4 to 8. If there is any data below, it may be next time. 41,42,43,44,45,46,47,48 .
I can"t figure it out. It looks very simple. I don"t know how to start. It doesn"t matter how you write it. I"d like to ask a master to help me. Thank you!
sn comes in order, which is not convenient. Do not press id,name. In the present order.