How to I get an array of the last n items of another array in PHP?
You can use http://us2.php.net/array_slice.
$new = array_slice($old, $n);
However, $n is the offset to start the slice, so to calculate it, you would need to subtract this from the length of the array: $n = count($old) - $target_size.
$n
$n = count($old) - $target_size