- array_slice: documentation ( source)
- print_r: documentation ( source)
<!DOCTYPE html>
<html>
<body>
<?php
$a = array(
"a"=>"red",
"b"=>"green",
"c"=>"blue",
"d"=>"yellow",
"e"=>"brown",
);
print_r(array_slice($a,0,6));
?>
</body>
</html>