- Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- array(2) { [0]=> int(3) [1]=> int(5) } jest
<?php
$data = [
[
'id' => 3,
],
[
'id' => 5,
]
];
$ids = array_column($data, 'id');
var_dump($ids);
if (in_array(5, $ids)) {
echo 'jest';
}