<?php
$keyArray = array("clientId","clientName","clientAdsress","clientPhone");
$valuesArray = array(
"0"=>array("1001","aaaaa","ddddddd","22222222"),
"1"=>array("1002","bbbbbb","ddddddd","11111111"),
"2"=>array("1003","ccccc","ddddddd","33333333")
);
$finalData = array_combine($keyArray, array_map(null, ...$valuesArray));
print_r($finalData);
- Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
- Array
(
[clientId] => Array
(
[0] => 1001
[1] => 1002
[2] => 1003
)
[clientName] => Array
(
[0] => aaaaa
[1] => bbbbbb
[2] => ccccc
)
[clientAdsress] => Array
(
[0] => ddddddd
[1] => ddddddd
[2] => ddddddd
)
[clientPhone] => Array
(
[0] => 22222222
[1] => 11111111
[2] => 33333333
)
)
preferences:
76.04 ms | 408 KiB | 5 Q