foreach as backwards php code example Example: php foreach reverse foreach(array_reverse($array) as $var) { echo $var // Will show in reversed order }