Posts by user131441 • 26 points
1 post
-
1
votes1
answer49
viewsA: Maximum occurrences of an item
$itens = []; foreach ($ativ_semanal as $ativ) { if (array_key_exists($ativ->num_semana, $itens)) { $itens[$ativ->num_semana]++; } else { $itens[$ativ->num_semana] = 1; } } Is that what…