I have an array: I want to retrieve closest larger value with the nearest aspect ratio (same orientation). So, in case of $needle = ‘768×1280’ – 800×1280. And, in case of $needle = ‘320×240’ – 640×480. While the closest here is 480×640 it shouldn’t be matched, because its aspect ratio differs too much. So on, and so forth. Purpose: I