<?php $valores = [ ["1","1","1","1"], ["2","2","2","2"] ];//array of values $keys = ['k1','k2','k3','k4']; //array of keys $id = ['SpecialKey' => 'SpecialValue'];//new array of items I want to add var_export( array_map( fn($row) => array_combine($keys, $row) + $id, $valores ) );
You have javascript disabled. You will not be able to edit any code.