Yngvarr

Generation

generate functionTue, 20 Dec 2022

last 10 in array

$people = [ 'John Doe', 'Jane Doe', 'Joe Bloggs', 'Sophie Doe', 'John Doe', 'Jane Doe', 'Joe Bloggs', 'Sophie Doe', 'John Doe', 'Jane Doe', 'Joe Bloggs', 'Sophie Doe' ]; function last10($array) { return array_slice($array, -10); } last10($people);

Questions about programming?Chat with your personal AI assistant