<?php
$array = array(
'Dow Jones' => array(3, 10, 1, 5, 4, 15, 49, 14, 7, 2, 3)
'Direct US' => array(1, 2, 1, 2)
);
$length = max(array_map('count', $array));
$array = array_map(
function (array $a) use ($length) { return array_pad($a, $length, null); },
$array
);
print_r($array);
- Output for 5.4.0 - 5.4.27
- Parse error: syntax error, unexpected ''Direct US'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/WLHtp on line 5
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /in/WLHtp on line 5
Process exited with code 255.
preferences:
184.45 ms | 1395 KiB | 64 Q