<?php
$array = [[0, 3, 10, 5, 6, 9, 2, 7, 1, 4, 8, 11], [0,1], [0,1], [0,1]];
$deletes = [3, 5];
$results = [];
foreach ($array as $value) {
foreach ($value as $valueVal) {
$results[] = in_array($valueVal, $deletes);
}
}
var_export($results);
- Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.16, 8.4.1 - 8.4.3
- array (
0 => false,
1 => true,
2 => false,
3 => true,
4 => false,
5 => false,
6 => false,
7 => false,
8 => false,
9 => false,
10 => false,
11 => false,
12 => false,
13 => false,
14 => false,
15 => false,
16 => false,
17 => false,
)
preferences:
132.73 ms | 408 KiB | 5 Q