3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testArray = array(array ( 0 => 'Depth [Nom]', 1 => '0.004 in', ), array ( 0 => 'Language', 1 => 'English', ), array ( 0 => 'Length [Nom]', 1 => '10 in', ), array ( 0 => 'Material', 1 => 'Adhesive Vinyl', )); $output = array(); foreach($testArray as $v){ $output[] = array($v[0] => $v[1]); } echo '<pre>'; print_r($output);
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 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.24, 8.3.0 - 8.3.12
<pre>Array ( [0] => Array ( [Depth [Nom]] => 0.004 in ) [1] => Array ( [Language] => English ) [2] => Array ( [Length [Nom]] => 10 in ) [3] => Array ( [Material] => Adhesive Vinyl ) )

preferences:
53.09 ms | 408 KiB | 5 Q