I would like to reverse the order of this code\'s list items. Basically it\'s a set of years going from oldest to recent and I am trying to reverse that output.
Assuming you just need to reverse an indexed array (not associative or multidimensional) a simple for loop would suffice:
$fruits = ['bananas', 'apples', 'pears']; for($i = count($fruits)-1; $i >= 0; $i--) { echo $fruits[$i] . ''; }