array_slice
returns a slice of an array
$sliced_array = array_slice($array, 0, 5)
is the code you want in your case to return the first five elements
array_slice
returns a slice of an array
$sliced_array = array_slice($array, 0, 5)
is the code you want in your case to return the first five elements