$array = [['height' => 1], ['height' => 2], ['height' => 3], ['height' => 4], ['height' => 5]];
$filtered = array_filter($array, function ($item) {return $item['height'] >= 3;});
echo count($filtered);
$cnt = 0;
foreach($scoolChild as $iname => $height)
{
if ($height > 173)
$cnt++;
}
$scoolChild_filtered = array_filter($scoolChild, function($item){
return $item > 173;
});
array_filter(
$array,
function($row) {
return $row['height'] > 173;
}
);
$scoolChild = array(
'Антон' => 172,
'Семен' => 165,
'Лена' => 189,
'Иван' => 171,
'Петр' => 182,
'Сидор' => 176,
'Аня' => 180,
'Таня' => 179,
'Маня' => 171
);
$tall = array_filter(
$scoolChild,
function($height) {
return $height > 173;
}
);