我需要将more键及其值压入数组中。如果我使用下面的代码将第一个key对替换为第二个key对。供您引用:使用的代码:foreach($projectData['projectsections']as$key=>$name){$projectData['projectsections'][$key]=['name'=>$name];$projectData['projectsections'][$key]=['id'=>'1'];}当前结果:'projectsections'=>[(int)0=>['id'=>'1'],(int)1=>['id'=>'1']],预期:'projectse