- var_dump: documentation ( source)
<?php
$rows = [
['id' => 21, 'text' => 't1', 'Mon' => 1],
['id' => 22, 'text' => 't2', 'Mon' => 0],
['id' => 23, 'text' => 't3', 'Mon' => 1],
];
$rowsResult = [];
foreach($rows as $index => $row){
if($row['Mon'] == 1){
$rowsResult [$index] = $row;
}
}
var_dump($rowsResult);