<?php
$content_array = [
[123, 456, 789],
[123, 456, 111],
[123, 789, 789],
];
$excluded_content_pieces = array( 789 );
foreach($content_array as &$content_piece) {
$content_piece = array_filter(
$content_piece,
function($a) use ($excluded_content_pieces) {
return !in_array($a, $excluded_content_pieces);
}
);
}
var_dump($content_array);
preferences:
47.14 ms | 402 KiB | 5 Q