<?php
$type = array('Type 1','Type 2','Type 3',' Type 4','Type 5');
$desc = array('Description 1','Description 2','Description 3','Description 4','Description 5');
$brand = array('Brand 1','Brand 2','Brand 3','Brand 4','Brand 5');
$model = array('Model 1','Model 2','Model 3','Model 4','Model 5');
$res = array_map(function(...$val) {return $val;}, $type, $desc, $brand, $model);
print_r($res);
- Output for 7.0.0 - 7.0.25, 7.1.0 - 7.1.25, 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.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- Array
(
[0] => Array
(
[0] => Type 1
[1] => Description 1
[2] => Brand 1
[3] => Model 1
)
[1] => Array
(
[0] => Type 2
[1] => Description 2
[2] => Brand 2
[3] => Model 2
)
[2] => Array
(
[0] => Type 3
[1] => Description 3
[2] => Brand 3
[3] => Model 3
)
[3] => Array
(
[0] => Type 4
[1] => Description 4
[2] => Brand 4
[3] => Model 4
)
[4] => Array
(
[0] => Type 5
[1] => Description 5
[2] => Brand 5
[3] => Model 5
)
)
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Array
(
[0] => Array
(
[0] => Type 1
[1] => Description 1
[2] => Brand 1
[3] => Model 1
)
[1] => Array
(
[0] => Type 2
[1] => Description 2
[2] => Brand 2
[3] => Model 2
)
[2] => Array
(
[0] => Type 3
[1] => Description 3
[2] => Brand 3
[3] => Model 3
)
[3] => Array
(
[0] => Type 4
[1] => Description 4
[2] => Brand 4
[3] => Model 4
)
[4] => Array
(
[0] => Type 5
[1] => Description 5
[2] => Brand 5
[3] => Model 5
)
)
preferences:
171.53 ms | 403 KiB | 196 Q