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);