<?php
$array = array(
0 => array(
'key1' => '123',
'key2' => 'values we',
'key3' => 'do not',
'key4' => 'care about'
),
1 => array(
'key1' => '124',
'key2' => 'values we',
'key3' => 'do not',
'key4' => 'care about'
),
2 => array(
'key1' => '125',
'key2' => 'values we',
'key3' => 'do not',
'key4' => 'care about'
)
);
echo max(array_column($array, 'key1'));
- Output for 5.5.4, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.30, 8.0.0 - 8.0.20, 8.1.0 - 8.1.7
- 125
- Output for 5.1.6, 5.2.0
- Fatal error: Call to undefined function array_column() in /in/U8Re6 on line 24
Process exited with code 255. - Output for 4.3.0
- Fatal error: Call to undefined function: array_column() in /in/U8Re6 on line 24
preferences:
58.93 ms | 411 KiB | 5 Q