3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( array ( 'count' => 1, 0 => 'Max, Mustermann', 1 => 'Job', 2 => 'Companyname', 3 => 'IT', 4 => 'CEO', 5 => 'N610-611', 6 => '+49 (30) 111111', 7 => '+49 (30) 111111', 8 => 'max@company.de' ), array ( 'count' => 1, 0 => 'Alicia Keys', 1 => 'Job', 2 => 'Companyname', 3 => 'IT', 4 => 'CEO', 5 => 'N610-N611', 6 => '+49 11111', 7 => '+49 11111', 8 => 'alikey@company.de' )); foreach ($array as &$arr) { $arr = array_combine(array('count', 'Name', 'Job', 'Company', 'Division', 'CEO', 'Room', 'Tel', 'Fax', 'E-Mail'), array_values($arr)); } print_r($array);
Output for 5.6.38 - 7.3.0rc3
Array ( [0] => Array ( [count] => 1 [Name] => Max, Mustermann [Job] => Job [Company] => Companyname [Division] => IT [CEO] => CEO [Room] => N610-611 [Tel] => +49 (30) 111111 [Fax] => +49 (30) 111111 [E-Mail] => max@company.de ) [1] => Array ( [count] => 1 [Name] => Alicia Keys [Job] => Job [Company] => Companyname [Division] => IT [CEO] => CEO [Room] => N610-N611 [Tel] => +49 11111 [Fax] => +49 11111 [E-Mail] => alikey@company.de ) )