PHP – Limit Array Results

$count = 0;
foreach ($records as $record) {
print $record;
$count++;
if ($count == 5) break;
}

PHP – Limit Array Results Read More »